07-22-2011 06:22 AM
i am working for translate an application in multiple language by using "Locale.get(Locale.LOCALE_en" but now unable to convert "SERBIAN, SLOVENIAN languages" because blackberry plugins(1.3) 9800simulater could not support these languages. so please give me solution what should i do?
07-26-2011 12:49 AM
no one give me answer of my question. so please tell me one thing why we use "Locale.get(Locale.LOCALE_en)"
for multiple language. if pulgin do not provide method for SERBIAN, SLOVENIAN so shoud i use any one method of plugin like "Locale.get(Locale.LOCALE_hn)" & provide the values of SERBIAN, SLOVENIAN keys. it would be write or wrong. please give me revert.
07-26-2011 11:52 AM
Locale has other constructors besides those that take an constant integer. Have you tried something like "Locale.get("sr", "scg")"?
Documentation is your friend, if you go to the Locale API doc page, it says it's "Compatible with java.util.Locale in Java's standard edition." and links to the java.util.Locale API docs.
In the explanation section of that page it lists out ISO-639 and ISO-3166 codes which are used in the creation of a Locale. If you are making resource files and localizing them then you would simply append the language codes to the end of the resource file's name and BlackBerry will handle picking the correct language for you (unless you want a specific language, then you need to use the Locale class).
Last, since you said that you are making a translation app, know that BlackBerry does not do translation. You need to use the previously mentioned resource files and store different translations, or use an online service. BlackBerry's (and any other device's) handling of languages is simply to pick the correct resource file since errors, messages, etc. are usually locale specific, they don't do any translation internally.
Just trying to cover all bases.
07-28-2011 01:36 AM
Thanks for your response. but i didn't try something like "Locale.get("sr", "scg")". can you provide me a demo, how to use this, & how to use Locale class for SERBIAN, SLOVENIAN languages?
07-28-2011 11:08 AM
That kinda was the (unplanned) demo.
I don't use Locale and since you seem like you are using it, but you can't FIND a certain locale, I looked up the ISO codes and attempted to produce the proper Locale get function.
The only place I know you can use it is with getting a ResourceBundle. That way you can get language specific resource bundles.
07-29-2011 01:10 AM
but i am unable to use ISO codes. i found the ISO decoding table to this link "http://www.iso.org/iso/country_codes/iso_3166_code
07-29-2011 11:21 AM
I used this for ISO-3166 codes: http://www.chemie.fu-berlin.de/diverse/doc/ISO_316
08-03-2011 03:44 AM
Thanks for that link,
but i am unable to use country code. how to use it. please give me a little bit demo with using country code for SERBIAN, SLOVENIAN .
08-06-2011 11:39 AM
Sorry for the delay, have been very busy lately.
I went through 2 sites to see how to use Locale (the normal J2SE version) just because I havn't really had a need for it:
The second link lists a bunch of locale values, so I tried 2 of the ones for Serbian and Slovenian.
Slovenian (generic): Locale.get("sl")
Slovenian (Slovenia): Locale.get("sl", "SI")
Serbian (generic): Locale.get("sr")
Serbian (Yugoslavia): Locale.get("sr", "YU")
They worked just fine, if this isn't what your looking for then I don't know.