Try to show text in different language

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

Answers (1)

Mithun Sen
Mithun Sen

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

Related Questions