I need to detect OS language using javascript so I can view my page depending on the language.
I know that we can detect the browser language but that is not enough for me.
I need Operation System language
Thanks in advance
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no cross-browser way to do this. Internet Explorer supports the following:
navigator.browserLanguage: browser languagenavigator.systemLanguage: Windows system languagenavigator.userLanguage: Windows user-specific languageBut there is no way to access these settings from any other browsers (that I can tell) so don’t use them: stick to the standard
navigator.language(corresponding to the browser language) if you want to maintain cross-browser functionality. If you do use them you will tie your web site to a specific family of operating systems (i.e. Windows) and a specific browser (i.e. Internet Explorer). Do you really want to do this?Why is the browser language insufficient for your application?