Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java croatian locale

Tags:

java

locale

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?

like image 846
Ivan Karlovic Avatar asked Jun 12 '26 13:06

Ivan Karlovic


1 Answers

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.

like image 84
Jonas Adler Avatar answered Jun 14 '26 02:06

Jonas Adler