Reputation: 154
I have set a cookie named 'lang'. It will be assigned with a value by the current language while browsing. But how can I show a text in the current language?
Upvotes: 0
Views: 111
Reputation: 523
Try -
if($_COOKIE["lang"]=='dutch'){
$text='dutch text';
}
elseif($_COOKIE["lang"]=='german'){
$text='german text';
}
elseif($_COOKIE["lang"]=='french'){
$text='french text';
}
echo $text;
Upvotes: 3