• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I want JDialog in English

 
Ian Wark
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.

I realize this is probably pretty low priority for most of you, but this is a simple question. Because my system is a Japanese OS I get all my JDialogs appearing with Japanese messages that is rather irritating. I tried changing the locale for my components and even the default locale, but it doesn't seem to make any difference. Without defining the text myself, is there a simple way for me to get the messages to appear in English (like the rest of my project)?

Thanks in advance.
 
DANNY JI
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i meet the same problem with it.
and it is answer for SUN.
-------------------------------------------------------------------------
> I found when i using JOptionPane.OK_CANCEL_OPTION ,
>i would get BUTTON OK in english ,
>but cancel in japanese or chinnese with japanese or chinnese OS.
>It seem depend on the OS and Java version.
>May i think the program is running on English System and iqnore it.
Yes, this is ok.
-------------------------------------------------------------------------
 
Ian Wark
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Danny,

Nice to know someone shares my frustration.

It would be nice, though, to know the rulefor how this gets set.

What are the setLocale methods in many swing components for (like JDialog)? I read that they could be used to set the Locale on an individual component level. Why don't these make a difference?
 
Kai Witte
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

I recommend to set user.language manually when starting java if you just want to see how your program looks like with an other locale setting without modifying it. Example:

java -Duser.language=de LocTest

for German. You can also set this programatically when the program is already running, but wether that applies to certain components or not depends on many things then, including implementation details.

Conan
 
Norbert Lebenthal
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A bit late for sure but it could help someone searching the website.

Hence, to change the default locale: Locale.setDefault(myLocale);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic