Documentation Center

Localizing a control

You can localize the label, tooltip, and other text of a UI control object by editing the <text> attribute of its corresponding control element in the controls.xml file.

About this task

The <text> element specifies a placeholder corresponding to the name of a name/value pair in the resources-xx.prop file representing the language in which the LiveContent S1000D UI is displayed. For example, to localize the text of the Bookmarks UI control, add the <text>ctrl.bookmark</text> text attribute to the corresponding control element definition in the controls.xml file. Then, in the resources-xx.prop file for each language that will be used for the UI, add the desired text as the value corresponding to the name ctrl.bookmark. At run time, the UI control object is created using text from the appropriate language resource file.

Procedure

  1. Open the controls.xml file in a text editor.
  2. In the controls.xml file, locate the control element corresponding to the desired UI object.
    For example, to localize text for the Bookmarks icon, locate the <control id="CV_bookmark" type="icon"> tag.
  3. Between the element's opening and closing tags, add or edit the <text> element to include a placeholder representing the text associated with the element as follows.
    <text>ctrl.bookmark</text>
  4. Save and close the controls.xml file.
  5. In the resource file for each language in which the UI will be displayed, add a name/value pair containing the desired text as in the following example in English.
    ctrl.bookmark=Bookmarks.

Results

At run time, the Bookmarks icon is created using the text represented by the ctrl.bookmark placeholder from the appropriate language resource file.