You can translate the text strings of a deployed Visual Composer model using the standard portal translation worklist mechanism. When models are deployed, they are bundled as Portal Archive (PAR) packages and stored in the portal in the Visual Composer folder of the Portal Content Directory (PCD). By setting the proper translation options in Visual Composer (see “Prerequisites” following), two translation files are created when you deploy (and automatically compile) the model:
localization.properties: a Visual Composer translation file that contains all the string identifiers (see Text Type Classifications) and raw text strings from the model
package_lang.info: a portal-like translation worklist file, including the portal UI-string classification codes
Once you deploy your file to the portal, you can translate it using the Translation Worklist Editor, accessed by choosing Portal Content Translation in the Portal Administration Guide.
. For more information about portal translation procedures, seeAll standard plain texts ("static" values) in the model - such as field labels, button labels and tooltips - are entered automatically into the translation lists. However, dynamic text - such as field values - cannot be entered. Dynamic expressions and formulas containing strings can be entered in the translation lists as long as they include a special TRANSLATE function code.
Note
Avoid using the TRANSLATE function for static values, since 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.
For example:
Hello: Tagged automatically for translation
"The price is" & @Price: Not tagged for translation
TRANSLATE("The price is")& @Price: Tagged for translation
For more information about the TRANSLATE function, see Text Functions.
You have tagged the model for translation by choosing
and selecting the following checkboxes:Deploy model with PAR
Generate Translation Info file
To prepare text within a formula (dynamic expression) for translation:
To the right of the field (in the Configure Element task panel or in the Control Properties dialog box) that will contain the formula, click fx, Formula or choose Enter formula from the drop-down menu. The appropriate Expression Manager dialog box is displayed.
Select the formula and enter the required fields, as needed.
Before entering the text string, expand the Text Functions node and double-click TRANSLATE (at the bottom of the list).
In the parentheses after TRANSLATE, enter the text and the type of UI-string classification code.
Example
The following is an example of defining a formula that includes a dynamic field (BANK_CTRY) and static text for translation.
For more information about the TRANSLATE function and the possible values for the UI-string classification code, see Text Functions and Text Type Classifications.
Upon deployment, the translation files are created, containing all standard static strings and those strings created in formulas that contain the TRANSLATE code. The result of the previous example would be listed in the package_lang.info file as follows: