Interface translation fallbacks
This page is for administrators who run the administration or a public design in a regional locale, such as French of Canada or Spanish of a Latin American country. A locale without its own translation does not fall back to English at once: the translator tries the translations it falls back to, in order (Languages in Exponential, section 13).
Contents
The chain
Each step is decided by the first rule that answers:
i18n.ini [TranslationSettings] FallbackLanguages[]: what is configured always wins.- The classes of
FallbackRules[], added by extensions. - With
AutomaticLanguageFallback=enabled(the default), the most complete translation of the same language:fre-CAtofre-FR,ger-ATtoger-DE.
The answer is asked again, which makes a chain such as esl-AR -> esl-MX -> esl-ES. It ends at a locale nothing
answers for, at the English source texts, at a cycle (reported) or after FallbackMaxDepth steps.
First or merge
FallbackMode=first (the default) loads the first file of the chain each translation root has. FallbackMode=merge
loads every file of the chain, the most general first, so a message the specific translation lacks comes from the
next one. Merge shows fewer English leftovers in regional locales.
Seeing the fallbacks
./console exp:i18n fallbacks # every locale: coverage, extensions, chain
./console exp:i18n fallbacks --locale=fre-CA,ger-AT # each step with its rule
./console exp:i18n check # exit 1 on a problem, for CISetup > Interface languages (/setup/languages, policy setup/system_info) shows the same in the
administration, read only.
Settings
i18n.ini [TranslationSettings] | Default | Meaning |
|---|---|---|
FallbackLanguages[<locale>] | 100 entries | the translation a locale falls back to |
FallbackRules[] | empty | classes asked after the configured fallbacks |
AutomaticLanguageFallback | enabled | the same-language fallback |
AutomaticFallbackExclude[] | eng | languages left alone |
FallbackMaxDepth | 4 | most steps of a chain |
FallbackMode | first | first or merge |
Put changes in settings/override/i18n.ini.append.php and clear the caches
(php bin/php/ezcache.php --clear-tag=i18n after changing translation files, --clear-tag=ini after settings).
Typical public sector cases
| Case | Suggestion |
|---|---|
| A regional variety with its own spelling rules | add its own .ts translation for the strings that differ, FallbackMode=merge |
| A minority language without translation | the interface stays in the configured fallback or English; translate the public design's few strings |
| Staff in two official languages | each chooses; no fallback needed |
Related pages
- Administration interface languages
- Interface language list
- Languages in Exponential
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.