Java Cookbook
currency
Problem:
You want to use a currency other than the default for the region.
Solution:
We can specify a currency separate from a region. This will give us a numeric format that is appropriate to the locale, but use a currency code for the specified locale.
Problem:
You want to format and parse localized currency values.
Solution:
Currency formatting at its most basic is straight forward in Java programming. Simply retrieve a currency instance of the NumberFormat class and format your number.
To format a currency for Japanese for Japan:
If you are testing any of these recipes in Eclipse and the characters are not displaying correctly in your console visit http://i18ncookbook.com/eclipse_settings.
This site is ad supported. I hope you find something among our sponsors worth clicking. ;)
i18n search