Hello,
I have only written one application wich was internationalized. I used
a combobox but the ideas and lessons can be applied however you change
the locale.
I quickly discoered that it was much preferrable to restart the
application with a new language than doing it while running.
In your case I would do it like this:
set the locale with settings from the Preferences node. With the
default to your desired default.
(something like this I think:
Preferences prefs= Preferences.userNodeForPakage(this.getClass);
Locale.setDefaultLocale(new
Locale(prefs.get("language","EN"),prefs.get("country","us"));
and then as a result of the button being pressed you put the new
result
for say the spanish button you can
prefs.put("language","ES");
prefs.put("country","ES");
and then you pop up a box asking the user to restart. And then when
the user restarts it is in spanish.
I found this desireable since texts have such different length in
different lanugages, so it will undoubtly mess up your layouts. I
first tried to solve it with .validate(); but it does not seem to work
very well in some cases. So I decided to go for the restart option,
since the program remembers the setting anyway the user do it once and
then don't have to wory about it.
regards
Daniel
>hi all,
>
[quoted text clipped - 12 lines]
>
>Chanchal