How does multilingual support work on AGS pages?
Short answer
The languages of the AGS pages are determined by the Dictionaries (Multilingual) profile selected in the Dictionary field in the AGS settings of the vService. The Supported Languages list of the dictionary is selected from TR7's ten-language catalog, and the first language in the list is the default language; in the Translations section, a value is entered in every language in the list for each Translation Key. The text fields in Login Forms and Page Templates are bound to the dictionary by selecting the Dictionary type and writing the same key; the standard texts of the Default type come from TR7's built-in ten-language texts. The built-in Default Dictionary contains all ten languages, and English Only contains only English; neither of them has translation rows.
How Does It Work?
- The languages are selected: Languages are added to the Supported Languages list in the dictionary. The language in the first position is marked as (Default); the pages are presented in the languages in this list.
- The translations are entered: In the Translations section, a key (e.g.
welcomeTitle) is added and its value is written for each language in the list. The values can contain a Smart Variable (e.g. a greeting with the username). - The text is bound to the key: In the text field in the form or the template, the Dictionary type is selected and the same key is written.
- The dictionary is assigned to the vService: The dictionary is selected in the Dictionary field of the vService. When the page is opened, the key is searched for in this dictionary and the value in the language presented to the visitor is shown.
Language catalog: English, Türkçe, Español, Deutsch, Русский, Français, Português, 中文, 日本語, العربية.
Multilingual Support in TR7
| Text type | Does it change by language? | Its source |
|---|---|---|
| Static | No | The text written in the field; it appears the same in every language |
| Dictionary | Yes | The value of the key in that language in the dictionary selected for the vService |
| Default | Yes | TR7's built-in ten-language texts (login, password, submit, cancel…) |
| No Text | - | No text is shown |
- The dictionary is defined on the AGS → Pages & Language → Dictionaries (Multilingual) screen; on the vService, it is selected in the Appearance section of the General Settings window or in the Presentation & language row of the AGS Management tab.
- Each vService uses a single dictionary; the keys are searched for only in that dictionary. The same dictionary can be shared by multiple vServices.
- The key name starts with a letter and contains only letters, digits and
_(Translation Key). The same key cannot be entered twice for the same language.
Common Misconceptions
- "The language selection is made in the page template." There is no language setting in the template; the languages are determined in the dictionary selected for the vService.
- "If Default Dictionary is selected, my own texts are translated too." The built-in dictionaries have no translation rows; only the standard texts of the Default type change by language. For custom texts, a new dictionary is created and the keys are added.
- "Text written as Static is translated too." Static text stays the same in every language; text to be translated is written with the Dictionary type.
- "A language outside the catalog can be added to the dictionary." The Supported Languages list is selected only from the ten-language catalog.
How it is done in the documentation
