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.132Expected:
[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)?
Best Answer01-27-2020 13:31
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
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.
Best Answer01-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
Best Answer