You have basically two ways to do this:
- Change the locale of your operating system
- Change the locale manually in your wireless toolkit.
First you have to find the emulator.properties file. In Sun's Wireless Toolkit this is found in
C:\WTK2.5.2\j2mewtk_template\wtklib
and in Sony Ericsson SDK it is found in C:\SonyEricsson\JavaME_SDK_CLDC\WTK2\wtklib
.Then you should search for this property:
microedition.locale
In my installation it locked like this:
microedition.locale: en-US
The code consists of two parts; the language code and the country code. These are separated by a dash ('-'). Notice that this is not as in Java SE, where it is separated by and underscore ('_'). The language codes are defined in ISO-639 and the country codes in ISO-3166. In my case I changed it to:
microedition.locale: sv-SE
All you have to do now is to save the file and restart the emulator. Notice that this does not change the locale of the emulator, it only changes what is returned by
System.getProperty("microedition.locale");
In my current project we use this to load the correct resources. Thus we need to test how the different strings are looking in different languages and screen resolutions.