Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Localizing an application

by Retired ‎02-12-2010 12:49 PM - edited ‎09-17-2010 04:27 PM (4,996 Views)



Modify an application to support localization.

Prerequisite: You should complete the lab entitled Creating a User Interface before you start this exercise.



  • Discover how to create string resources in the IDE.
  • Discover how to use resources in your code.


  1. Extract CityInfoB_Incomplete.zip
  2. In the IDE, open the cityinfob.jdw workspace
  3. Open the CityInfoB.java source file.


  1. Add a resource header (.rrh) file to the cityinfob project.
  2. Add a resource content (.rrc) file to the cityinfob project.
  3. Add resources for each text string that is used in the application. Refer to the text file included in the cityinfob project for a list.
  4. Open the CityInfoB.java source file.
  5. Import the necessary package for localization.
  6. Add code to retrieve a ResourceBundle.
  7. Replace string literals by retrieving the appropriate resource.

Check Your Work


(In CityInfoB_complete)




In this exercise, you discovered the following things:

  • how to work with the IDE resource editor to create language resources
  • how to use language resources in application code
Users Online
Currently online: 29 members 5,807 guests
Please welcome our newest community members: