cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Creating, Adding and Referencing External Resource Bundles

Creating, Adding and Referencing External Resource Bundles

Summary

This article gives information on how to create, add and reference an external resource bundle.

Synopsis

This article provides information about how to create, add, and reference an external resource bundle.


Discussion

External Resource Bundles are custom resource bundles that provide localized strings in the installer. They contain locale specific properties files (one per locale) where each locale properties file has keys and values in the following format:
key=value
These resources are referenced during the installer design, bundled at build time and resolved at install time. Localization of text elements can be achieved by using the custom locale properties files from the external resource bundle, and by referencing a key in the external resource bundle. The installer resolves the localized value based on the value of $INSTALLER_LOCALE$. For example, if one chooses French on the installer's splash screen, InstallAnywhere gets the value of the key from the French locale properties file within the external resource bundle.
Creating a properties file:
The name of the properties file in the external resource bundle needs to be in the following format:

<bundle_name>_<language_code>.properties

Note: bundle_name can be any name, however, this must be the same for the other locale properties file you have in the same external resource bundle

<language_code> is the language code for one of the InstallAnywhere supported locales. Note that you must create a properties file for each locale that you plan to support.

If you have an English locale file like custom_en.properties, then when you create locale files (in the same resource bundle) for other languages, like French for example, it should be custom_fr.properties. The naming format of the locale files should be same except the language code like fr, en in the above example.

You can define your key/value pairs for each localized string in the properties file

<Key>=<value>

Adding an External Resource Bundle:
  • In InstallAnywhere Advanced Designer IDE, go to Project > Locales
  • In the External Resource Bundle Settings, double click on the space below ?Bundle Name?
  • Type a Bundle Name of the external resource bundle you want to use, such as 'custom' in the above example
  • Double click on the space below Resource Bundle Path. It will pop up a ?Choose A File? window, from where you can browse and select one of the locale properties files
Referencing an External Resource Key from the locale properties file:
Use the following syntax to reference keys in the locale properties file of your external resource bundle:

$L{<bundle_name>.<key>}

where bundle_name is the name provided in the External Resource Bundle Settings on the Project -> Locales task.

Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Dec 07, 2010 11:15 AM
Updated by: