Issue 351715 in chromium: navigator.language is always set to the OS UI language regardless of the UI language of Chrome

60 views
Skip to first unread message

chro...@googlecode.com

unread,
Mar 12, 2014, 10:36:35 AM3/12/14
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: Pri-2 Via-Wizard Type-Bug OS-Linux

New issue 351715 by sergei.v...@gmail.com: navigator.language is always set
to the OS UI language regardless of the UI language of Chrome
http://code.google.com/p/chromium/issues/detail?id=351715

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
Gecko) Ubuntu Chromium/32.0.1700.107 Chrome/32.0.1700.107 Safari/537.36

Steps to reproduce the problem:
1. Open Languages an Input settings property page.
2. Set langs in order:
a) Russian
b) English
c) English (United States)
3. Open console and run
> navigator.language

What is the expected behavior?
Must print "ru"

What went wrong?
Prints "en-US"

Did this work before? No

Chrome version: 32.0.1700.107 Channel: n/a
OS Version: Ubuntu 12.04
Flash Version: Shockwave Flash 11.2 r202

This makes unable to localize web application with jquery AMD moduls as
main logic should base on the "navigator.language" property. Windows Chrome
version working as expected but Linux one give wrong property value.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Aug 29, 2014, 10:20:06 AM8/29/14
to chromi...@chromium.org

Comment #1 on issue 351715 by Austin.France: navigator.language is always
set to the OS UI language regardless of the UI language of Chrome
https://code.google.com/p/chromium/issues/detail?id=351715

Despite having en-GB as preferred language in languages list, chrome is
still returning en-US for navigator.language.

> navigator.language
"en-US"
> navigator.languages
["en-GB", "en", "en-US"]

This is on OSX, and system preferences language and region is set to
English United Kingdom, so navigator.language isn't even following the OS
selected language.

Before I changed my language preferences in chrome, they were listed as
[ "en-US", "en" ]

chro...@googlecode.com

unread,
Oct 30, 2015, 2:32:50 AM10/30/15
to chromi...@chromium.org
Updates:
Cc: kavv...@chromium.org
Labels: Needs-Feedback

Comment #2 on issue 351715 by kavv...@chromium.org: navigator.language is
always set to the OS UI language regardless of the UI language of Chrome
https://code.google.com/p/chromium/issues/detail?id=351715

Unable to reproduce the issue on windows 7, Linux Ubuntu 14.04 using chrome
version 46.0.249.80 with the below steps

1. set languages in order
Russian,English
2.Open console
3.navigator.language
4.got "en-US"

Please find the attached screen shot and confirm anything missed here.
Observed the same behavior on Firefox as well.May be this is not chrome
specific issue.Please check the issue on other browsers once and update the
thread.

Thanks,

Attachments:
351715.png 323 KB

chro...@googlecode.com

unread,
Oct 30, 2015, 5:31:34 AM10/30/15
to chromi...@chromium.org

Comment #3 on issue 351715 by sergei.v...@gmail.com: navigator.language is
always set to the OS UI language regardless of the UI language of Chrome
https://code.google.com/p/chromium/issues/detail?id=351715

The property name is 'navigator.language', so it should show the UI
language of Chrome. This way the OS' language name must be set somewhere in
'os.language' or 'system.language'.

See Mozilla Firefox for reference - it shows as expected.

chro...@googlecode.com

unread,
Oct 30, 2015, 5:48:37 AM10/30/15
to chromi...@chromium.org

Comment #4 on issue 351715 by sergei.v...@gmail.com: navigator.language is
always set to the OS UI language regardless of the UI language of Chrome
https://code.google.com/p/chromium/issues/detail?id=351715

btw, see http://www.w3schools.com/jsref/obj_navigator.asp
and find there description for the navigator.language property:

language <http://www.w3schools.com/jsref/prop_nav_language.asp>Returns the
language of the browser

chro...@googlecode.com

unread,
Dec 22, 2015, 1:54:35 AM12/22/15
to chromi...@chromium.org
Updates:
Cc: msrchan...@chromium.org

Comment #5 on issue 351715 by msrchan...@chromium.org: navigator.language
is always set to the OS UI language regardless of the UI language of Chrome
https://code.google.com/p/chromium/issues/detail?id=351715

Verified the issue on Latest Stable# 47.0.2526.106 on Ubuntu 14.04 and
could not reproduce the issue.
@sergei.v.lukin -- Could you please re-check on the latest version
mentioned and provide us the feedback.
Thanks in Advance.

chro...@googlecode.com

unread,
Dec 23, 2015, 4:22:50 PM12/23/15
to chromi...@chromium.org

Comment #6 on issue 351715 by sergei.v...@gmail.com: navigator.language is
always set to the OS UI language regardless of the UI language of Chrome
https://code.google.com/p/chromium/issues/detail?id=351715

Still have the same issue.

Chrome: Version 47.0.2526.73 Ubuntu 14.04 (64-bit)

Current language list:

> navigator.languages
["ru", "en", "en-US"]
This is fine - the languages are ordered correctly.

> navigator.language
"en-US"

Correct, please close the issue.

chro...@googlecode.com

unread,
Dec 23, 2015, 4:23:52 PM12/23/15
to chromi...@chromium.org

Comment #7 on issue 351715 by sergei.v...@gmail.com: navigator.language is
always set to the OS UI language regardless of the UI language of Chrome
https://code.google.com/p/chromium/issues/detail?id=351715

chro...@googlecode.com

unread,
Feb 4, 2016, 6:08:03 AM2/4/16
to chromi...@chromium.org
Updates:
Status: WontFix

Comment #8 on issue 351715 by durga.be...@chromium.org: navigator.language
is always set to the OS UI language regardless of the UI language of Chrome
https://code.google.com/p/chromium/issues/detail?id=351715

Closing the issue as per the above comment # 7.
Reply all
Reply to author
Forward
0 new messages