My browser is in French but Yii::$app->request->getPreferredLanguage() is return string ‘en-US’ (length=5) when I dump it to see its value. What is wrong? I was expecting ‘fr-FR’.
What I want is to use the language of the browser when the user load the website for the first time; after that he can choose another language. So I thought with Yii::$app->request->getPreferredLanguage() I can get the browser language.
Yes it does!!! My below post should be deleted; but the system is prompting an error when I want to delete it. I would also like to know if when it doesn’t find matching language does it return the application default language?