New issue
Advanced search Search tips

Issue 598240 link

Starred by 4 users

Issue metadata

Status: Duplicate
Merged: issue 151677
Owner: ----
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

navigator.language is returning en-US for Brazil(pt_BR) system language.

Reported by arun.emm...@gmail.com, Mar 28 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.4.4 (KHTML, like Gecko) Version/9.0.3 Safari/537.86.4

Steps to reproduce the problem:
In Mac OSX 
1. Change the system language to Portuguese Brazil (pt_BR). 
(even changed the language in chrome://settings/languages).
2. Reboot the system and then launch the Chrome.
3. Inspect Element->console , in Chrome Console Run command "navigator.language" . It should return pt_BR . But its returning "en_US"

What is the expected behavior?
navigator.language should return pt_BR for Brazil

What went wrong?
navigator.language is returning en-US for Brazil.

Did this work before? No 

Chrome version: 49.0.2623.108  Channel: stable
OS Version: OS X 10.9.5
Flash Version: Shockwave Flash 21.0 r0
 
Cc: erikc...@chromium.org pinkerton@chromium.org
Labels: M-51
Status: Untriaged (was: Unconfirmed)
I am able to reproduce this issue on Mac OS X 10.9.5 for Chrome reported version#49.0.2623.108 as we all as on Latest Canary#51.0.2692.0.

This is working fine on Latest Mac OS X 10.11.3.

Thank you!
Observing the similar behavior from M26: 26.0.1410.46.
Is there any planned dates for the chrome update with this fix.

Comment 4 by rsesek@chromium.org, Apr 12 2016

It's odd that this is 10.9 specific. The code that sets the system locale from Cocoa is here:  https://code.google.com/p/chromium/codesearch#chromium/src/ui/base/l10n/l10n_util_mac.mm&q=OverrideLocaleWithCocoaLocale&sq=package:chromium&type=cs&l=26

That should make it to Blink through blink::Navigator::languages() -> blink::ChromeClient::acceptLanguages() -> blink::ChromeClientImpl::acceptLanguages() -> blink::WebViewClient::acceptLanguages() -> content::RenderViewImpl::acceptLanguages.

That returns the renderer_preferences_.accept_languages. That setting is controlled by chrome://settings/langauges.

Did you add Portuguese - Brazil to the list there?

I think Chrome uses its own language setting for the Accept-Languages header and the system language setting for the browser UI.
Yes, i added the  Portuguese - Brazil  to the list in chrome://settings/langauges.

Labels: -Pri-2 mavericks Pri-3
Owner: karandeepb@chromium.org
Status: Assigned (was: Untriaged)
[mac triage] pseudorandomly picking karan to take a look when you have some spare time to see if this can be reproduced on 10.9 (and hopefully fixed :).

Comment 7 by tkent@chromium.org, May 26 2016

Components: -UI>I18N UI>Internationalization
Owner: ----
Status: Untriaged (was: Assigned)
Unassigning myself. Putting status=Untriaged so that this gets addressed.

Mergedinto: 151677
Status: Duplicate (was: Untriaged)
mac triage: This almost certainly has the same root cause as 151677 (we're not detecting pt-BR).

Sign in to add a comment