0

I have a Java application with some JTextFields in it and I want the default language to be Hebrew.

I tried setting JVM argument(-Duser.language=he), I tried setting locale to hebrew:

TextFields[ i ].setLocale( new Locale("he"));

Locale changed all right - but input language doesnt change.

The only thing that worked was to change default input language through SystemParametersInfo which change system language. Is there any other way?

David Yee
  • 3,515
  • 25
  • 45
Roni
  • 1
  • 1
  • I think "iw" instead of "he". Hebrew, Israel, iw_IL: [More here](http://www.oracle.com/technetwork/java/javase/javase7locales-334809.html#util-text). Also read the javadoc on [Locale](http://docs.oracle.com/javase/7/docs/api/java/util/Locale.html) about -D settings for user.language, user.region, user.country, user.variant – javajon Jul 06 '14 at 11:54
  • Also try `new Locale("he", "IL")`, as suggested [here](http://docs.oracle.com/javase/tutorial/i18n/locale/create.html). – trashgod Jul 06 '14 at 14:15
  • I think it doent matter "he" or "iw" - it changes automatically. I tried new Locale("he", "IL") - doesnt work. – Roni Jul 07 '14 at 10:25
  • I've recently answered a related question on the Hebrew locale. The behavior seems to had been changed with Java 17. See: https://stackoverflow.com/questions/8202406/locale-code-for-hebrew-reference-to-other-locale-codes/70882234#70882234 – Tom Silverman Jan 27 '22 at 16:52

0 Answers0