03-30-2011 09:04 AM - edited 03-30-2011 09:05 AM
I tried to implement Localization to my app. The requirement said to localize my app into English and Indonesian. But the problem is Indonesia is not listed in the constants. I have read another thread about this, but it's not solved.
The documentation siad that this class (Locale) is compatible with java.util.Locale. In which way the compatibility is? I tried to create my own Locale (using java.util.Locale) which I should be able to create one using String language and String country parameter. The problem is java.util.Locale is simply not there. I cannot find it in Blackberry library.
Any idea of how to localize an app into language that is not listed in Locale constants?
Thanks in advance.
03-31-2011 02:29 PM
You can use _in for Indonesian BlackBerry resource files. You can see this in action in the localizationdemo included with the BlackBerry Java Plug-in for Eclipse and BlackBerry JDE.
04-04-2011 07:53 PM
Thanks for the answer. Yes, I have read the localization demo. Unfortunately, we have implemented our code based on the RIM's tutorial about how to use Localization. When we change the language setting, we do it with this kind of code:
So are, most of our UI components uses custom fields that make it difficult to change the mechanism just like the localization demo's code.
So, for now, my solution is to use another reserved language constants, since we haven't support these language, such as Cathalan.
03-27-2012 04:34 AM
I've the same problem, and I want to create a custom language like "uk_APPMODE1"
I've tried the folowing code :
Locale loc = Locale.get("uk_APPMODE1"); ResourceBundleFamily family = ResourceBundleFamily.getBundle(BUNDLE_NAME).getFam
ily(); ResourceBundle bundle = family.getBundle(loc); String res = bundle.getString(MyAppResource.TEST);
I've a MyApp.rrc, MyApp_uk.rrc, MyApp_uk_APPMODE1.rrc but it returns me the value present in MyApp_uk.rrc the default language file.
I can't get it work and I don't want to use an existing language, but create my own custom language because it depends of the type of the running application and not of the bby language.
Thanks for your help