On iOS there’s a handy function on NSNumber
localizedStringWithStyle:
Which will format a numeric value into a string using digits appropriate to that region (possibly Western, possible Arabic, etc).
I assume in Java on Android a NumberFormat object (or similar) could be configured to do this but I’m not sure how.
So my question. In Android how to you format a number in locale specific digits?
When you instantiate the
NumberFormatobject, you call it like this:You can pick from the list of static
Locales or callNumberFormat.getAvailableLocales()to search for a locale which matches your desired output.