Languages
The kit ships in English, Arabic, Indonesian and Spanish. Arabic is right to left. The apps follow the phone's language, and users can pick another one in Profile → Language. The API answers in the same language: error messages, notifications, emails and catalog names.
The Spanish, Indonesian and Arabic texts are a careful first translation. Have a native speaker review them before launch, especially Arabic.
Turn languages on or off
Admin → Settings → Languages
- Enabled languages: the ones the apps offer and the API answers in.
- Default language: used when the phone's language isn't enabled.
- Arabic-Indic digits in Arabic: show ١٢٣ instead of 123 for numbers, prices and dates.
- Text overrides: change any app text per language without a new app release. Use the message's key from
mobile/lib/core/l10n/arb/app_en.arb, e.g.homeTitle. Apps pick up changes the next time the language loads, and keep them offline. Placeholders such as{name}work in overrides. The few messages with plural or select rules ({count, plural, …}) can't be overridden; change those in the ARB files.
Catalog content (categories, services, presets) and content pages (terms, privacy, FAQ) have a field per language in the admin.
Add a new language
Example: French (fr).
1. App texts
-
Copy
mobile/lib/core/l10n/arb/app_es.arbtoapp_fr.arb, set"@@locale": "fr", and translate every value.- Keep
{placeholders}and the structure of{count, plural, …}and{x, select, …}messages exactly as they are. Translate only the text inside them. - Use the descriptions in
app_en.arb(@keyentries) for context.
- Keep
-
Check and generate:
cd mobile node tool/check_arb.js # every key present, same placeholders flutter gen-l10n node tool/gen_l10n_overrides.js # keeps admin overrides working for new keys dart format lib/core/l10n/gen -
Right-to-left languages (Hebrew, Persian, Urdu) need nothing else: Flutter mirrors the layout. Run the Arabic golden tests as a reference:
flutter test --tags golden.
CI runs the same check, so a missing key or a stale generated file fails the build.
2. API texts
- Copy every file in
backend/lang/es/tobackend/lang/fr/and translate the values. Keep the keys, the:placeholdersand the|plural forms. - Copy
backend/lang/es.jsontobackend/lang/fr.jsonand translate it (validation summary lines). - Run
vendor/bin/pest tests/Unit/LangParityTest.phpand addfrto its list of languages. The test fails if a file or key is missing.
3. Enable it
The language code must be in SettingsSchema::SUPPORTED_LANGUAGES (fr already is). Then tick it in Admin → Settings → Languages, and fill in the French names for your categories and services in the catalog.
How it works
- App: Flutter
gen-l10nbuildsAppLocalizationsfrom the ARB files.AppLocalizationsWithOverrides(generated bytool/gen_l10n_overrides.js) puts the admin's overrides on top.TranslationOverridesfetchesGET /config/translations?lang=xxand caches the result. - Formats: dates, numbers and money go through
intlwith the current language. With Arabic-Indic digits on, the formatting locale isar_EG. - API: the
Accept-Languageheader picks the language (first two letters, only enabled ones), and responses carryContent-Language. Notifications and emails use the user's language.