New issue
Advanced search Search tips

Issue 829760 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 99526
Owner: ----
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

navigator.language cant be set to "de-CH", .toLocaleString giving wrong results.

Reported by gtyedm...@gmail.com, Apr 6 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36

Steps to reproduce the problem:
1. Change "Chrome displayed in " to German (Switzerland)
2. run this code:

var x=123456.789;
console.log(navigator.language);
console.log("Expected output: " + x.toLocaleString('de-CH'));
console.log("Actual output:   " + x.toLocaleString());

What is the expected behavior?
navigator.language should be "de-CH"
.toLocaleString() should return "123’456.789"

What went wrong?
navigator.language is set to "de"
toLocaleString() returns "123.456,789"

Did this work before? N/A 

Chrome version: 64.0.3282.167  Channel: n/a
OS Version: 10.0
Flash Version: 

Maybe related to this issues:
https://bugs.chromium.org/p/chromium/issues/detail?id=99526&q=switzerland&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified 
https://bugs.chromium.org/p/chromium/issues/detail?id=120473&q=de-CH&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified
 
Components: -Blink Blink>JavaScript>Internationalization
Labels: Needs-Milestone
Cc: susan.boorgula@chromium.org
Labels: M-67 Target-67 FoundIn-67 OS-Mac
Status: Untriaged (was: Unconfirmed)
gtyedmers@ Thanks for the issue.

Able to reproduce the issue on Mac OS 10.13.3 and Windows 10 on the latest Canary 67.0.3387.0 and Stable 65.0.3325.181.
Unable to check the issue on Ubuntu 14.04.

On Changing the Chrome language to German (Switzerland) and executing the given code in Devtools -> Console, can observe the navigator.language is "de" and toLocaleString() returns "123.456,789".
On Mac OS, on executing console.log(navigator.language);, can see the output as de-DE.
Attached are the screen shots for reference.

This is a Non-Regression issue as this behavior is observed from M60 Chrome builds. 
Hence marking this as Untriaged for further updates from Dev.

Thanks..
829760 -Mac.png
55.9 KB View Download
829760.png
72.4 KB View Download

Comment 4 by js...@chromium.org, Apr 10 2018

Mergedinto: 99526
Status: Duplicate (was: Untriaged)

Sign in to add a comment