browser-locale icon indicating copy to clipboard operation
browser-locale copied to clipboard

Chrome browser language not necessarily first in languages list

Open R4DIC4L opened this issue 8 years ago • 1 comments

It seems that in the latest version of Chrome (v. 59.0.3071.115), the display language is not necessarily the first one in the window.navigator.languages list (so taking languages[0] gets a wrong result).

See screenshots below:

Chrome navigator chrome_navigator

Chrome settings chrome_settings

Maybe it would be an idea to take into account the window.navigator.language value first and, if not found, use the first entry in the window.navigator.languages array.

P.S.: As far as I could see, now even the latest versions of IE and Edge set the window.navigator.language value.

R4DIC4L avatar Jul 18 '17 06:07 R4DIC4L

Just tested with Chrome 62 and it seems quite the opposite: navigator.language apparently is the language of Chrome itself and navigator.languages[0] is the preferred language I set in the settings.

Perhaps you did not restart Chrome?

jampy avatar Nov 30 '17 13:11 jampy