Hello everyone,
As I have tried with FormatDecimal, the default separator is thousand:
1000000 -> 1,000,000
But I'm working on a Japanese project, the separator should be ten thousand as below:
1000000 -> 100,0000
How should I configure the function to get ten thousand separator?
Thanks !!!
Hi Kiet Phan,
To format currency according to locale you can use the following JavaScript:
1. Currency format with currency symbol:
let num = 1000000;
let text = num.toLocaleString("jp-JP", {style:"currency", currency:"JPY"});
Output
2. Currency format without currency symbol:
let text = num.toLocaleString("jp-JP");
If you find any difficulty, then I will also help with the oml.
Thanks a lot for helping me.
The JS toLocaleString still give the result as thousand separator. But I need ten thousand separator (1000000 -> 100,0000).
So I think I need to write my own format function in JS ^^.
Thank you.!