I found that there are a different responses for this code for every language, depend on lot of factors.
$lang = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']);
echo $lang;
for example English language : en_EN,en-EN,en_GB,en_US,en-GB,en-US.
the same for French and other languages.
what i'm looking for is where can i find those lang synonym so i can provide the right page language for every one of them.
for now i have a 3 language, so what i'm looking for is to find all possibilities for English language and French language and Arabic language something like this:
if (($lang=="en_EN") OR ($lang=="en-EN") OR ($lang=="en_GB") OR ($lang=="en_US") OR ($lang=="en-GB") OR ($lang=="en-US")) {
echo 'show English version';
}else if (($lang=="fr_FR") ...... ) { // i don't know the other like fr-FR .....
echo 'show French version';
}else if (($lang=="ar_AR") ...... ) { // i don't know the other like ar-AR .....
echo 'show Arabic version';
}else {
echo 'English as default';
}