45
Views
2
Comments
Solved
FormatDecimal for Japanese currency format
Question

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 !!!

2023-05-08 05-34-05
Piyali Saha
Solution

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 num = 1000000;

let text = num.toLocaleString("jp-JP");

Output

If you find any difficulty, then I will also help with the oml.

2025-12-04 09-01-03
Kiet Phan
Champion

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

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.