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
,
Apr 8 2018
,
Apr 9 2018
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..
,
Apr 10 2018
|
||||
►
Sign in to add a comment |
||||
Comment 1 by dtapu...@chromium.org
, Apr 6 2018