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 Answer
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.