Translations
Show the desk, prints and mail in each user's language.
Each user sees the desk in their own language. Print formats and mail can use another language per Record.
Pick a language
| Who | Language used |
|---|---|
| Signed-in user | User's Language, else the site's |
| Guest | ?_lang=, then the preferred_language cookie, then the browser's Accept-Language, then the site's |
| Background job | The language of the user who started it |
Only languages enabled in the Language list count. Arabic, Hebrew, Persian and Pashto render right to left.
Where translations come from
Apps ship gettext files in locale/<lang>.po. No human-language files ship with Cardinal yet, so a new site shows English.
A System Manager adds Translation Records in the desk. These win over the app's files.
| Translation field | Example |
|---|---|
| Language | de |
| Source Text | Sales Invoice |
| Context | Sales Invoice, or empty to translate it everywhere |
| Translated Text | Ausgangsrechnung |
Saving a Translation takes effect on every node on the next request. Field labels, section labels and Select options use the RecType's name as their context. Record values are not translated.
Rename a RecType for users
English has a dictionary too. A Translation in language en with Source Text CRM Lead and Translated Text Lead shows "Lead" wherever the desk names that RecType, module or workspace: the sidebar, titles, search and bell entries. Other languages start from the English names.
Print in another language
The print view's Language selector renders the page in that language. A Print Format's Default Print Language sets it per format.
For app authors
Extract and refresh an app's catalogs with the CLI:
cardinal i18n extract --app erp
cardinal i18n new de --app erp
cardinal i18n update --app erp --locale de