Godot Version
4.5-stable
Question
How do I get the thousand’s separator and the decimal separator for the user’s locale?
e.g., in America (en_US) we would write ten thousand and thirty cents like so: “10,000.30”.
In other places, they might write “10.000,30” or even “10 000,00”
Things I have figured out:
- I can get the locale from
OS.get_locale(). TextServer’sformat_number()doesn’t seem to do anything for anything other than a few languages (not locale) likefa.- Godot seems to have ICU4C built in but I don’t see anyway to get a NumberFormat object out of it.
Thanks for the help!