BlackBerry Forums Support Community

BlackBerry Forums Support Community (
-   Developer Forum (
-   -   [Localization] How to switch from a resource to another?? (

siagianfaber 03-11-2009 05:22 AM

[Localization] How to switch from a resource to another??
Dear all,

I'm trying to understand how to use Localization API right now.
I have created a resource file, let's say MyResource.rrh (you know that MyResource.rrc automatically generated). The screens and everything that need the resource able to recognize it. Ok, everything goes fine.

And then i created another resource, MyResource_it.rrc. My question is, how can i switch from MyResource.rrc to MyResource_it.rrc ?

p.s Anyone please correct me if there's anything wrong i've written above.

simon.hain 03-11-2009 09:41 AM

you have to switch the device language to italian

siagianfaber 03-11-2009 09:07 PM

Is there another way other than switching the device language?
I use ResourceBundle to load the resource file which is MyResource.rrc.


private ResourceBundle resourceBundle = ResourceBundle.getBundle(MessageResource.BUNDLE_ID, MessageResource.BUNDLE_NAME);
By using the same class, how can i switch the MyResource.rrc to MyResource_it.rrc ?

Ivanov 03-12-2009 09:56 AM

use Locale.setDefault(). I guess you have to reload your resourceBundle after it.



All times are GMT -5. The time now is 03:55 AM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.