When I use the default java locale on my linux machine it comes out with the US locale settings, where do I change this so that it comes out with the correct locale?
You could call during init or whatever Locale.setDefault() or -Duser.language=, -Duser.country=, and -Duser.variant= at the command line. Here's something on Sun's site.
I believe java gleans this from the environment variables in which it was launched, so you'll need to make sure your LANG and LC_* environment variables are set appropriately.
The locale manpage has full info on said environment variables.
One way to control the locale settings is to set the java system properties user.language and user.region.
With the user.language
, user.country
and user.variant
properties.
Example:
java -Duser.language=th -Duser.country=TH -Duser.variant=TH SomeClass
If you are on Mac, simply using System Preferences -> Languages and dragging the language to test to top (before English) will make sure the next time you open the App, the right locale is tried!!