0

I have code that formats default locale currency symbol (correct me if I'm wrong):

String df = NumberFormat.getCurrencyInstance().getCurrency().getSymbol();
String dfs = NumberFormat.getCurrencyInstance().format(11);
System.out.println(df + " "+ dfs );

Output

 $ $11.00

I would like to have custom currency symbol instead of $. I have changed currency symbol in locale file I found in my Debian under /usr/share/i18n/locales.

Unfortunately this change has no influence on code output. How to solve this problem?

vico
  • 17,051
  • 45
  • 159
  • 315
  • I didn`t check, but this [link](http://docs.oracle.com/javase/7/docs/technotes/guides/intl/enhancements.7.html#currency) should help you, or this similar [question](http://stackoverflow.com/questions/9982537/how-do-i-add-the-new-currency-code-to-java) – djvazquez Dec 30 '13 at 16:00

1 Answers1

0

Use NumberFormat.getCurrencyInstance(Locale locale) to retrieve the instance for your locale.

Vlad
  • 471
  • 5
  • 7