This question already has an answer here:
What is the best way to detect the language of User? I have in my application a dropdownlist where the User can select the application language (English or Portuguese), internationalization works well, however only after logging in.
I would like the login screen, the system was already presented in the correct User language (for example based on browser language).
Is it correct to do so? How could it be done?
EDIT
I got following this article: https://github.com/samdark/yii2-cookbook/blob/master/book/i18n-selecting-application-language.md
</div>
Is it correct to do so? You can also check use ip and check country from where it come. The worst case is when you are not able to switch language.