ZPT-JS reference - Attributes - I18nLanguage

Syntax

argument ::= expression
                

Description

The data-language statement defines an expression that evaluates to the current language to use in translations. After using a data-language statement you will be able to use i18nBundle instances in data-domain attributes.

ZPT-JS uses the tr expression to make it easy to translate text, number, dates...

Differences with ZPT

This statement does not exist in ZPT.

Examples

Using a literal:

<div data-language="'es'">
    ...
</div>
                

Using a path expression:

<div data-language="myObject/getLanguage()">
    ...
</div>