01-26-2020 11:03
01-26-2020 11:03
I tried to localize the numbers in my clockface, but toLocaleString doesn’t work as expected.
Example:
let test = 1000.132;
console.log("Number " + test.toLocaleString("en-US"));
console.log("Number " + test.toLocaleString("de-DE"));
Output:
[7:59:11 PM] App: Number 1.000.132
[7:59:11 PM] App: Number 1.000.132
Expected:
[7:59:11 PM] App: Number 1,000.132
[7:59:11 PM] App: Number 1.000,132
Is there a bug in toLocaleString or is it not supported (yet)?
01-27-2020 13:31
01-27-2020 13:31
You might only be able to use it without parameters, then it's detected based upon the language. Just switch the language of the simulator and see how it behaves.
01-31-2020 11:09
01-31-2020 11:09
Thanks for the reply.
I tried that, but it gives the same result: 1.000.834