How to test Localization without Rebooting

Jim Cobban

Usenet Archive
Joined
Sep 4, 2002
Messages
45
Reaction score
0
I am putting localization features into my application: for example using a ResourceBundle to customize output strings. Everything is driven by the current default Locale. Is there some way external to the program to set the default Locale. At the moment the only way I know is to set the country and language through the Windows Control Panel and reboot. Do I need to add a feature to my program to permit the user to explicitly set the Locale?
 

Tor Iver Wilhelmsen

Usenet Archive
Joined
Dec 18, 2000
Messages
984
Reaction score
0
Jim Cobban said:
I am putting localization features into my application: for example using a ResourceBundle to customize output strings. Everything is driven by the current default Locale. Is there some way external to the program to set the default Locale.

Have you tried Locale.setDefault? Just asking is all. Run your app "wrapped" in an app that sets Locale as needed.
 

Real Gagnon

Usenet Archive
Joined
Aug 2, 2002
Messages
193
Reaction score
0
I am putting localization features into my application: for example
using a ResourceBundle to customize output strings. Everything is driven by the current default Locale. Is there some way external to the program to set the default Locale. At the moment the only way I know is to set the country and language through the Windows Control Panel and reboot. Do I need to add a feature to my program to permit the user to explicitly set the Locale?

Change the user.language and user.region properties :

java -Duser.language=en -Duser.region=US MyApplication

Bye.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,243
Members
248,133
Latest member
DujonT

Latest Threads

Top