Creating resource files

When you create a new .rrh resource header file, the BlackBerry® Java® Plug-in for Eclipse® creates the associated .rrc resource content file. If an .rrh file already exists, the BlackBerry Java Plug-in for Eclipse creates only the new .rrc file. If an .rrh file does not already exist, the BlackBerry Java Plug-in for Eclipse creates the .rrc file and the .rrh file.

For each BlackBerry device application that you want to localize, you must create a resource header file, a resource content file for the global locale, and a resource content file for any specific locales that you require.

File

Description

Example

Resource header file

This file defines the descriptive keys for each localized string.

During compilation, the BlackBerry Java Plug-in for Eclipse creates a resource interface automatically that uses the same name as the .rrh file with Resource appended.

AppName.rrh

Resource content file root (global) locale

This file maps numeric keys to string literals for the root (global) locale.

AppName.rrc

Resource content file (specific locales)

This file maps descriptive keys to values for the global and specific locales (language and country).

This file must have the same name as the resource header file, followed by an underscore (_) and the language code, and then, optionally, by a single underscore (_) and a country code (for example, AppName_en_GB.rrc).

Two-letter language and country codes are specified in ISO-639 and ISO-3166, respectively.

AppName_en.rrc


Was this information helpful? Send us your comments.