Skip to main content

adding Locales?

2 replies [Last post]
noky
Offline
Joined: 2005-05-20
Points: 0

Hi, I'm using phoneME advanced MR2 b34 (ARM Linux) and would like to know how to add additional Locale support. Searched the forums and google, found nothing. I need to add French support for an app and it is not supported out-of-the-box. The following Java tests show a limited Locale support by default:

Locale.getDefault(); # result: en_US
Locale.getAvailableLocales(); # result: en, en_US

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> Hi, I'm using phoneME advanced MR2 b34 (ARM Linux) and would like to know how to add additional Locale support. Searched the forums and google, found nothing. I need to add French support for an app and it is not supported out-of-the-box. The following Java tests show a limited Locale support by default:
>
> Locale.getDefault(); # result: en_US
> Locale.getAvailableLocales(); # result: en, en_US
>

Hi Noky,

Try this:

Download the J2SDK 1.4.2 source bundle from here:

http://java.sun.com/products/archive/
(Look for: J2SDK/J2RE - 1.4)

Unzip that bundle and look for the following files:

src/share/classes/sun/text/resources/LocaleElements_fr_FR.java
src/share/classes/sun/text/resources/LocaleElements_fr.java

Copy those files to the equivalent location in your phoneME MR2 source code:

cdc/src/share/classes/sun/text/resources/LocaleElements_fr_FR.java
cdc/src/share/classes/sun/text/resources/LocaleElements_fr.java

Edit your phoneME MR2 build file:
cdc/build/share/defs_cdc.mk

Modify these lines from this:
#
# Classes to be loaded at runtime.
#
CLASSLIB_CLASSES += \
java.net.BindException \
java.net.DatagramPacket \
java.net.DatagramSocket \
java.net.DatagramSocketImpl \
java.net.DatagramSocketImplFactory \
java.net.NetworkInterface \
java.net.PlainDatagramSocketImpl \
java.net.PortUnreachableException \
java.net.SocketException \
java.net.SocketOptions \
java.net.SocketTimeoutException \
java.util.CurrencyData \
sun.misc.Compare \
sun.misc.GC \
sun.misc.Sort \
sun.security.provider.SHA \
sun.text.resources.DateFormatZoneData \
sun.text.resources.DateFormatZoneData_en \
sun.text.resources.LocaleElements \
sun.text.resources.LocaleElements_en \
sun.text.resources.LocaleElements_en_US \

to this:
#
# Classes to be loaded at runtime.
#
CLASSLIB_CLASSES += \
java.net.BindException \
java.net.DatagramPacket \
java.net.DatagramSocket \
java.net.DatagramSocketImpl \
java.net.DatagramSocketImplFactory \
java.net.NetworkInterface \
java.net.PlainDatagramSocketImpl \
java.net.PortUnreachableException \
java.net.SocketException \
java.net.SocketOptions \
java.net.SocketTimeoutException \
java.util.CurrencyData \
sun.misc.Compare \
sun.misc.GC \
sun.misc.Sort \
sun.security.provider.SHA \
sun.text.resources.DateFormatZoneData \
sun.text.resources.DateFormatZoneData_en \
sun.text.resources.LocaleElements \
sun.text.resources.LocaleElements_en \
sun.text.resources.LocaleElements_en_US \
sun.text.resources.LocaleElements_fr \
sun.text.resources.LocaleElements_fr_FR \

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

noky
Offline
Joined: 2005-05-20
Points: 0

Thanks!