The Literal Assistant is part of the Layout Painter. You can use it to maintain texts of different languages for the literals that are referenced within the XML layout.
The concept of the multi language management is described in Multi Language Management. It is recommended that you read this information before you proceed with the information below.
The following topics are covered:
Note:
Text can also be translated using the
Literal Translator.
The Literal Assistant needs to know in which file the
language-specific texts are kept. Before you open the Literal Assistant, make
sure that the translationreference
property of the
page contains the name for your translation file. By default, this property is
empty.
For multi language support, you use the
textid
property for a label (instead of the
name
property).
See also Writing Multi Language Layouts in Multi Language Management.
When you open the Literal Assistant for the first time, a message appears in the status bar indicating that the Literal Assistant is not available. In this case, you have to specify the name of the translation file as described above.
To open the Literal Assistant
From the
tab of the Layout Painter, choose .When the translation file can be found, the Literal Assistant is shown in the preview area. For example:
All referenced literals of the currently selected language are provided in the Literal Maintenance area.
Colored dots are shown in front of each literal. The color of the dot indicates whether the Literal Assistant could find the corresponding text in the translation file for the currently selected language.
Possible dot colors:
Green | A text is available in the translation file. |
---|---|
Yellow | The translation file contains a line for the literal - but the text is empty. |
Red | The literal (and text) does not yet exist in the translation file. |
When you select the first column (that is, the column to the left of the colored dot), the corresponding node is automatically selected in the layout tree and the properties for this node are shown in the properties area.
To add/modify text for the current language
Enter all required text in the Language column.
Choose the
command to save your text input.The red and yellow dots change to green, and the added/modified text is shown in the File Content area at the right. The translation file that is written back to the file system is sorted in ascending order.
Your changes will also be available in the preview of the HTML page.
The valid languages are determined by the existing subdirectories in the directory <your-project>/multilanguage. An entry for each subdirectory is provided in the Language drop-down list box.
Note:
You may have to choose the
command to refresh the Literal Assistant so that any subdirectories you have
just defined in your file system are shown in the drop-down list box.
To select another language
From the Language drop-down list box, select the required language.
When you have not yet saved your previous changes, a dialog appears asking whether you want to save your changes.
Important:
The Literal Assistant keeps changes for one language
only. If you want to maintain texts for several languages, save the changes
before you switch to another language. Otherwise, you will lose input.
The selected language is shown in the Language column of the table.
For comparison purposes, you can display the texts of another translation file in the Comparison Language column. The Comparison Language drop-down list box contains an entry for each subdirectory in the <your-project>/multilanguage directory.
To display another language for comparison
From the Comparison Language drop-down list box, select the required language.
The selected language is shown in the Comparison Language column of the table.