New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 642444 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug

Blocked on:
issue 99526



Sign in to add a comment

English (Canada) results in en-GB

Reported by wycks...@gmail.com, Aug 30 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Steps to reproduce the problem:
1. <chrome://settings/languages> Set Language Preferences in this order: [English (Canada), English (United States), English] And set Chrome to display in English (Canada).
2. Press Ctrl+Shift+I to bring up the developer tools
3a. In the console enter navigator.language

Alternative check in the console:
3b. In the console enter new Date().toLocaleString()

What is the expected behavior?
Checking navigator.language:
I was expecting en-CA.  That's what I set as my preferred language.

Alternative check with date:
I was expecting something in yyyy-MM-dd format (the en-CA format)

What went wrong?
navigator.language check:
Shows en-GB as the language.

Alternative check with date:
Shows date in en-GB format (dd/MM/yyyy) instead of the en-CA format which is yyyy-MM-dd.  (en-GB Also uses 24h time instead of AM/PM in en-CA)

This is relevant because Date.toLocaleString isn't using the locale associated with the chosen language of en-CA.

Did this work before? N/A 

Chrome version: 52.0.2743.116  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0

I don't know how (if there's another way) to tell the browser what language to use by default for the .toLocaleString() call (with no arguments -- obviously it's possible to pass in 'en-CA' explicitly, but the default needs to come from the user's preferences)
 

Comment 1 by wycks...@gmail.com, Aug 30 2016

In case it is not clear, this isn't related to the developer tools.  Any plain page will give the wrong (non-preferred according to language settings) result when it executes Date.toLocaleString() when languages are set as in the repro steps.

Comment 2 by tkent@chromium.org, Sep 4 2016

Components: -Blink UI>Settings Blink>JavaScript
Have you restarted the browser?

Comment 4 by wycks...@gmail.com, Sep 8 2016

Yes, of course.  I have restarted the browser.  The problem still exists.
Cc: u...@chromium.org littledan@chromium.org
Labels: Needs-TestConfirmation
Cc: js...@chromium.org
Labels: -Needs-TestConfirmation M-55
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on windows 7 using chrome version 53.0.2785.101 and canary 55.0.2857.0 with the below steps

1. Set Language Preferences in this order: [English (Canada), English (United States), English] And set Chrome to display in English (Canada).
2.run "navigator.language" in console
3.Output :: en-GB

This is observed from old builds M42 (42.0.2311.152 ).For M40 and prior versions not able to set English (Canada) as default language.Please find the attached screen shot for the same.

Marking it as Untriaged to get more inputs from dev team.

Thanks,
642444.png
89.2 KB View Download

Comment 8 by wycks...@gmail.com, Sep 12 2016

Thank you, kavvaru.
Status: Available (was: Untriaged)
Thanks kavvaru!
Components: -Blink>JavaScript Blink>JavaScript>API

Comment 11 by js...@chromium.org, Sep 14 2016

Blockedon: 99526
It's a well-known result of mapping en-Foo to en-GB for anything other than en-US. 
There are many other cases like that. See bug 99526. 

> set Chrome to display in English (Canada).

On Windows, you can do that?? Hmm... that should not be doable until bug 99526 is fixed. It's not set the UI langauge to en-CA (and other en variants other than en-US and en-GB) on Chrome OS. 

Comment 12 by js...@chromium.org, Sep 15 2016

BTW, standalone v8 does not have this issue. (that is, this is a Chrome issue: specifically bug 99526). 

LC_ALL=en_CA.UTF-8 out/rel/d8
V8 version 5.5.0 (candidate)
d8> new Date().toLocaleDateString()
2016-09-14

$ LC_ALL=en_AU.UTF-8 out/rel/d8
V8 version 5.5.0 (candidate)
d8> new Date().toLocaleDateString()
14/09/2016


 Issue 698513  has been merged into this issue.

Comment 14 by cyr...@gmail.com, May 9 2017

Any progress update on this?
Cc: yyushkina@chromium.org
Components: -Blink>JavaScript>API Blink>JavaScript>Internationalization UI>Internationalization
#11: Yes, you can set the display language to English (Canada). |navigator.language| will show 'en-GB', but the application locale preference (intl.app_locale) is set to "en-CA".

This seems sufficiently different from issue 99526 to keep open as a separate bug worth addressing.
Components: UI>Browser>Language
Owner: claudiomagni@chromium.org
Status: Assigned (was: Available)
Labels: Hotlist-LanguageSettings
Looks like this bug is blocked by 99526. May be worth chatting with Jungshik about why that bug has remained open for so long. Also, if sufficiently similar, maybe Claudio can tackle 642444 along with this one.

Comment 19 by js...@chromium.org, Jul 20 2017

Yes, right. The root cause is bug 99526. Why has it been open so long? Because I haven't managed to get to it. :-) 

Recently, I had a fresh look at it and may have a resolution before long. 
Didn't mean to make that sound pointed :) - just wanted to make sure we were aware of any complexity. Jungshik - you and Claudio should connect over VC sometime soon since you have so much context on this and related issues. For context, Claudio is tackling various issues surrounding language settings.

Comment 21 by js...@chromium.org, Jul 20 2017

Don't worry. I didn't take it that way. Smiley was not enough. :-)  Sorry for giving that impression. 

Thank you for connecting me with Claudio. We'll for sure coordinate.  
I had a first look at this and it seems unrelated to the rest of the Language bugs that Yana and I are currently working on.
Most likely I won't fix this before having fixed the rest of Language bugs.

Jungshik, I'll keep an eye on bug 99526.
If you have any insight that you want to share for this bug (642444), feel free to reach out to me.

Blockedon: 765077
Blocking: 765077
Blockedon: -765077
Labels: -Pri-2 Pri-3
Owner: ----
Status: Available (was: Assigned)
Blocking: -765077
Owner: js...@chromium.org
Status: Assigned (was: Available)
Jshin - reassigning this back to you since claudio is now on ChromeOS.
Just so you know, Microsoft Edge and Firefox both do the right thing.  All dates appear correctly (as en-CA) in other browsers I've tried.  Only Chrome is forcing it to en-GB.

I hate to see Chrome lose ground like this, but it means that I'm faced with recommending that users who are really complaining should switch browsers to resolve the issue.  I really don't want to recommend anything but Chrome.  So please fix this soon.

Comment 31 by wycks...@gmail.com, Jun 21 2018

As of Chrome 67.0.3396.87 this seems to be fixed.

Now when I enter navigator.language in the console, it correctly reports en-CA.

My sincerest thanks to whoever fixed it!

Sign in to add a comment