Portlet Factory, Version 6.1.2


 

Localizing user interface controls

You can use the Localized Resource builder to add a resource bundle to the web application. Depending on the browser's locale setting, the locale-specific resource bundle gets added to the web application. For example, you can configure button labels and other non-content elements of your pages to get their values from the resource bundle.

To localize non-content elements in the web application:

  1. Add a Localized Resource builder call to the model above non-content builders in the builder call list and specify the following input values:

    Resource Bundle Name

    Enter the fully-qualified name of the property file or Java class that serves as the default resource bundle. For example, enter com.acme.LabelResources for the property file stored as, WEB-INF/work/source/com/acme/LabelResources.properties.

    Store the locale-specific versions of this property in the same directory. For example, in the acme directory, you could store the Japanese version of the properties file (LabelResources_ja.properties) and the Italian version (LabelResources_it.properties).

    Language

    Enter the ISO language code for the resource bundle to load. Profile this value and create a profile set (Language), a profile for each language for which you have a resource bundle, and specify the ISO code as the Language value for each profile.

    Country

    Enter the ISO country code for the resource bundle to load. Profile this value and create a profile in an appropriate profile set (for example, Language) and specify the ISO code as the Country value for each profile.

  2. For any button label, or similar builder call input, set the value using the reference chooser and selecting the appropriate entry from the LocaleData variable, which the Localized Resource builder call adds to the web application.

Parent topic: Overview: localizing applications


Library | Support |