# Should I detect language from browser or OS?

**URL:** <https://forum.kirupa.com/t/should-i-detect-language-from-browser-or-os/313521>\
**Category:** web dev\
**Created:** [September 1, 2010, 7:54pm UTC](https://forum.kirupa.com/t/should-i-detect-language-from-browser-or-os/313521 "2010-09-01T19:54:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)\
**Post date:** [September 1, 2010, 7:54pm UTC](https://forum.kirupa.com/t/should-i-detect-language-from-browser-or-os/313521/1 "2010-09-01T19:54:35Z")

</div>

I’m creating a multilingual website and need to display translated text to the user. There are many ways to detect language with Javascript, but I don’t know which method is the best. I’ve never used a non-English OS or browser, so I don’t know how foreign people set up their computers.

[LIST]  
[_] **navigator.language** - all non-IE browsers  
[_] **navigator.browserLanguage** IE-only - Browser Localized Language  
[_] **navigator.systemLanguage** IE-only - OS Localized Language  
[_] **navigator.userLanguage** IE-only - OS Regional Settings  
[/LIST]

For non-IE browsers, we only have one choice, so it’s an easy decision. For IE browsers, we have three choices. Which one should we use? What is the likelihood that the three choices are out of synch? When you install a browser, does it automatically set its language to be the same as the OS language?
