Troubleshooting guide
236
BlackBerry Java Development Environment Development Guide
Files required for localization
Add localization support
File required for
localization
Description Example
Resource header This file defines descriptive keys for each localized string.
When the BlackBerry® Integrated Development Environment builds a project, it
creates a resource interface with Resource appended to the .rrh file name. For
example, if you create
AppName.rrh, the interface name is AppNameResource.
AppName.rrh
Resource content (root
locale)
This file maps resource keys to string values for the root (global) locale. It has the
same name as the resource header file.
AppName.rrc
Resource content (specific
locales)
This file maps resource keys to string values for specific locales (language and
country). Resource files have the same name as the resource header file, but these
are followed by an underscore (_) and the language code, and then, optionally, an
underscore (_) and country code.
Two-letter language and country codes are specified in ISO-639 and ISO-3166,
respectively.
AppName_en.rrc
AppName_en_GB.rrc
AppName_fr.rrc
Initialization This file initializes the resource bundle mechanism. This file is required only when
you compile resources as a separate project.
init.java
Task Steps
Add resource header files. 1. In the BlackBerry® Integrated Development Environment, on the File menu, click New.
2. In the File name field, type a file name.
3. Click Browse.
4. Select the folder that contains the file.
5. Click OK.
6. In the field, type the package name, for example, com.rim.samples.docs.countryinfo.
7. Click OK.
8. Click Yes.
9. Leave the file that appears in the text editor empty except for the package statement.
10. To add the file to your project, right-click the file in the right pane.
11. Click Insert into project.