2.10 Localizing Display Labels

Designer provides an easy way to localize the display labels defined in provisioning objects. You can provide localized string values whenever you see the button in Figure 2-3.

Figure 2-3 Localize Strings Button

When you click this button, Designer displays the Localization dialog box shown in Figure 2-4.

Figure 2-4 Localization Dialog Box

Table 2-3 Localizable Objects

Designer tool

Description

Directory Abstraction Layer Editor

  • Entity and attribute display labels

  • Relationship names

  • Global and local list items

  • Query display labels and parameter display labels.

Provisioning Request Definition Editor

  • Activity properties that are displayed to the user.

  • Form properties that are displayed to the user.

Provisioning Team Editor

  • Provisioning team display name and descriptions

You must provide a display label for the User Application driver’s default language, or you will encounter the following runtime error: The resource resolver com.novell.soa.common.i18n.LocalizedMapResolver did not return a resource for the default locale of <locale>. It is required that a resource exist for the default local.

The locale configuration is stored in the driver’s <default-locale> element in the AppConfig.AppDefs.locale-configuration XMLData attribute.

2.10.1 Supported Languages

You can localize the display labels in any language displayed in the localization dialog box. The supported languages are defined in the User Application driver. You can modify the list of supported locales as described in Section 2.9, Specifying Locales and Localization Resource Groups.

2.10.2 Localizing Directory Abstraction Layer Display Labels

The directory abstraction layer editor provides multiple ways to localize abstraction layer definitions. You can access the localization dialog boxes in these ways:

Table 2-4 Ways to Access the Localization Dialog Boxes

To define the localization text for

Action

Every localizable item in the directory abstraction layer

Select DAL > Set Global Localization.

or

Click Set Global Localization (from the editor’s toolbar), then select the Target Language before entering the localized text in the Target field.

A specific entity, relationship or list

From the tree view, right-click the object to localize, select Localize, then select the Target Language before entering the localized text in the Target field.

A single display label

Select a specific entity or attribute, then click Localize Display Label (beside the Display Label field in the Property pane).

2.10.3 Exporting and Importing Localized Labels

Designer provides a wizard that lets you export all of the display labels in your User Application project to an XML or properties file that you can localize and import back. You can export an entire driver, all directory abstraction layer or provisioning request definitions, or a single object at a time.

To export display labels:

  1. To launch the Export Localization Data Wizard, right-click a container node or an object in the Provisioning view.

  2. Select Localize > Export Localization Data.

  3. Fill in the fields as follows:

    Field

    Description

    Store in folder

    Specify the name of a local folder where the exported files should be written.

    Prefix for generated files

    Specify a prefix for the generated files. Determine a naming strategy so you are able to identity the files for projects.

    File Type

    Select XML or Properties depending on the encoding or format you prefer. XML files are UTF-8 encoded. Properties use Unicode*.

    Select the languages to export

    Select the languages you want localizations for. A file containing the display label key is generated for that language. The localizations need to be added to this file in the proper format so you can import them to the proper User Application driver objects.

    Prompt before overwriting existing files

    If this option is selected, Designer prompts you before it overwrites any existing files of the same name in the target directory.

  4. Click Finish. Designer displays a message describing the result of the export operation.

To import localized files:

  1. To launch the Import Localization Data Wizard, right-click a container node or an object in the Provisioning view.

  2. Select Localize > Import Localization Data.

  3. Fill in the fields as follows:

    Field

    Description

    Search in folder

    Specify the folder location where the files to import are located.

    File Type

    Select XML if the file you want to import is in XML format.

    Select Properties if the file you want to import is in the properties format.

    Preferences

    Select Suppress warnings about unused strings if you want the wizard to suppress warning messages.

    Select Create backup of existing display label strings if you want the wizard to create a backup of the existing strings before the import. Useful in case you need to revert.

    Files

    Select the files to import. This table is populated with the files from the folder location and file type specified above. If it is blank, no files of the specified type are located in the target folder. The wizard attempts to determine the language by looking at the filename. If the name cannot be determined, it defaults to English.

    You can change the Language column if the wizard assumes the wrong language. The wizard changes the filename to reflect the language you specify and import the display labels to the corresponding language.

  4. Click Finish to complete the import. Designer displays a status dialog box that describes the results including any errors reading the files and any warnings about display label keys that are unused because no match was found.