Jen2002 Posted October 22, 2021 Share Posted October 22, 2021 When I set the browser langauge to any other language than "en" (like "it", "da",...) echo always output "en" ? <?php $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); if ($lang = "en") { echo $lang; } else { echo "Other lang"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/314072-trouble-getting-the-browser-language-settings/ Share on other sites More sharing options...
requinix Posted October 22, 2021 Share Posted October 22, 2021 Step away from the computer for a while, eat something, then come back and look at if ($lang = "en") 1 Quote Link to comment https://forums.phpfreaks.com/topic/314072-trouble-getting-the-browser-language-settings/#findComment-1591306 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.