3

http://www.oracle.com/technetwork/java/javase/locales-137662.html

Here is the list of supported locales for Java.

How do I set them?

The line

Locale.setDefault(Locale.CROATIAN);

doesn't work, although croatian it's listed as supported. Is there another aproach or way to use it, or do I have to translate manually?

Ivan Karlovic
  • 221
  • 5
  • 14
  • Could you give more details on why the 'line' does not work? – bbaja42 Sep 20 '12 at 22:32
  • Because CROATIAN does not exist as a constant, there is only limited number of languages... Yet again, it is said croatian IS supported (in the link on the top), so there must be another way... – Ivan Karlovic Sep 20 '12 at 22:33

1 Answers1

3

try: Locale.setDefault(new Locale("hr", "HR"));

It is still up to you to support that locale in your application

have a look at the oracle i18n docs here.

Jonas Adler
  • 905
  • 5
  • 9