Multilanguage Dictionary
Last updated
Last updated
In the Multilanguage Dictionary
, you are able to add certain Symbols (specific Labels) with translations for every activated language in your application. Everywhere the Symbol is used, it will display the value according to the active Language.
The available languages and the option to change language settings in your application, can be added to your user interface in the Project settings
(see the Project Configuration documentation).
Dictionary Entries (Symbols) can be added to the dictionary via the green "plus" button. The new dictionary entry should have a Symbol - a unique and recognizable Label Name, which can be used in Design Template Settings, in the Template Editor as Labels or in Expressions. For each available Language as defined in your Project Configuration, you can add the language-specific text to be displayed.
If you do not provide a Translation Value for a certain Language, the Symbol Name will be displayed in its place when that specific language is active in the Runtime.
The content of your dictionary can be used in the Template Editor as Label or in an Expression (used for displaying values), it will show in the Expression as "$Symbol
" . You can also drag and drop the specific Dictionary Item onto the Template Editor Canvas or into the Expression Editor from the Dictionary Panel.
Depending on the active language, the specific translation value will be displayed in the runtime.
Dictionary Items can have one or more parameters, that you can position within the Translation Values using double curly brackets {{ and }} (creating placeholders). In the Expression where you want to use the Dictionary item, you can provide certain values to be replaced in those placeholders.
The translation for English is entered as:
> The name "{{0}}" is not allowed.
The expression on the Template is written as (using the LastName of the current user reference):
> $InvalidName([Data.CurrentUser]->[Users.LastName])
The end result will be something like:
> The name "NoNameEntered" is not allowed.
If the parameter is not provided, the expression will warn you that "an invalid number of parameters is provided", so you will have to provide a value for each placeholder that is defined with the Dictionary Symbol. If the value to replace the placeholder is empty, the display will just remove the placeholder and replace it with an empty string.