This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why is Locale not working here?

 
Jehan Jaleel
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to format monetary amounts by the country and the language. But I cannot seem to get the right currency symbol for all currencies. For example I have the following code..



Here I am trying to format 1000 in Euros (the official currency of Slovakia), I want the amont to appear with the currency symbol. But what I get is..

1 000,00 Sk

Is this how it is supposed to be? I checked in NumberFormat's getAvailableLocales and I am seeing that Slovakia is supported. So what am I missing?

Thanks.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using an older version of Java? Slovakia switched to Euros relatively recently (1 January 2009 according to Wikipedia). It could be that you are using an old version of Java from the time when the official currency was still Slovakian crowns (Sk).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic