Show TOC Start of Content Area

Procedure documentation Preparing Models for Translation  Locate the document in its SAP Library structure

Use

To translate the text strings of a Visual Composer model using the standard SAP translation system, you need to store the strings in the appropriate format. At SAP, this format is the XML Localization Interchange File Format (XLIFF) format (file extension XLF), which Visual Composer generates automatically during the model compilation process. At compilation, a separate master language XLF file is created for each model. This XLF file can be used to translate the model to multiple languages. The text strings in your model will then appear at runtime in the logon language.

Static values defined for the following properties are automatically tagged for translation and entered automatically into the XLF file:

·        Label property values

·        Title property values

·        Tooltip property values

·        Category Axis and Value Axis title property values for charts

·        Display Text values for static items in static and dynamic entry lists

Avoid using the TRANSLATE function for static values, because interpretation of the unnecessary TRANSLATE function may affect runtime performance. However, if you use a dynamic expression in a property, the value is not automatically tagged for translation. In this case, you should use the TRANSLATE function if you want the string to be translated. Dynamic expressions containing strings are added to the XLF file if they use the TRANSLATE function.

For example, see the following possible values for a Label property value:

·        Hello: Tagged automatically for translation

·        ”The price is” & @Price: Not tagged for translation

·        TRANSLATE(”The price is”)& @Price: Tagged for translation

Note

You can use the FORMAT function to format a translatable output string by using variables. The FORMAT function does not tag the string for translation. If the string also needs to be translated, you should nest a TRANSLATE function within the FORMAT function. The following example tags the string for translation, and enables the translator to change the syntax of the string during the translation phase to “Herr {2} {1}”:

FORMAT(TRANSLATE (“Mr. {1} {2}”), @FirstName, @LastName)

For more information about the TRANSLATE and FORMAT functions, see Frequently-Used Functions.

Procedure

To prepare text within a dynamic expression for translation:

...

       1.      To the right of the field (in the Configure Element task panel) that contains the expression, click fx. The Dynamic Expression Editor dialog box is displayed.

       2.      Select the formula and enter the required fields, as needed.

       3.      Before entering the text string, expand the Text Functions node and double-click TRANSLATE.

       4.      In the parentheses after TRANSLATE, enter the text string and, optionally, the UI-string classification code.

For more information about the TRANSLATE function and the possible values for the UI-string classification code, see Frequently-Used Functions.

Result

At compilation, the XLF file is created, containing all standard static strings and those strings created in expressions that use the TRANSLATE function. The XLF file can then be used to translate the model into multiple languages. The text strings in your model will then appear at runtime in the logon language.

The following is an example of how strings appear in the XLF file:

This graphic is explained in the accompanying text

 

For information on how to translate the contents of an XLF file, see SAP Note 939180. You can find the SAP Note at SAP Service Marketplace at: service.sap.com/notes.

End of Content Area