I have a list of amounts & their currencies
- 500 |USD
- 1000 |GBP
- 500000 |EUR
Now I would like to display these values in one particular locale and with the currencies' symbol.
E.g for en_US locale, show
- $500.00
- £1,000.00
- €500,000.00
And if en_DE locale, show
- $500,00
- £1.000,00
- 500.000,00 €
Using NumberFormat is not giving me the correct result as the currency symbol is dependent on the locale. I'm not able to decouple the currency symbol from the locale to format the number.
NumberFormat numFormat = NumberFormat.getCurrencyInstance(Locale.getDefault());
Is it possible to achieve these results without programmatically concatening the currency symbol to the formatted number values?