Files
TREK/wiki/Languages.md
T
Maurice bee500880e fix(i18n): every language says one file and five files its own way
Finishes the plural work the previous wip commit started. t() picks a
count string's form by the language's own Intl.PluralRules, and every
locale now spells out the forms its language reaches with whole
numbers, about 160 count strings in all: one, few and many in Russian,
Ukrainian and Polish, one and few in Czech and Slovak, five forms in
Arabic, one in the others, none in Japanese, Korean, Chinese, Thai,
Vietnamese and Indonesian. Each language was translated and then
reviewed on its own. English no longer reads "1 files", "1 updates
available" or "photo(s)".

Count labels shown next to a number now take that number too: the
atlas and admin statistics, the trip cards, journey and shared trip
pills, packing templates, receipts, storage usage, the Studio export
note. A heading that shared its key with a counted label keeps a key of
its own (the boarding pass heading, the Bookings tab), so languages that
put a noun after a number in the singular keep a plural heading. The
plugin hosts chip passed its count through .replace() after t() and
never got a form; three toasts sent the count as text. Mail and push
texts for shared photos and suppressed storage failures pick their form
in code through pluralForm.

A whole number sent as text counts too, which is how in-app
notification params arrive, and the plural rule follows the language of
the strings on screen while another one still loads.

The parity check knows which forms each language needs and refuses
missing and impossible ones. It also reads keys that contain a colon
now: it skipped them, which hid 58 missing plugin permission texts in
Catalan and 35 in Vietnamese, both translated. The client parity test
covers every language of the registry instead of a hand-kept list of 19,
and the placeholder spec lets a form spell its number out only where
its category is that one number. Brazilian Portuguese error screens
were in Breton, and an Arabic dashboard label held Hebrew text.
2026-10-08 00:01:59 +00:00

72 lines
2.8 KiB
Markdown

# Languages
TREK ships with translations for 27 languages, the [Help Center](Help-Center) guides included. You can change your language at any time without logging out.
## Supported languages
| Code | Language |
|------|----------|
| `de` | Deutsch |
| `en` | English |
| `es` | Español |
| `et` | Eesti |
| `fr` | Français |
| `hu` | Magyar |
| `nl` | Nederlands |
| `br` | Português (Brasil) |
| `cs` | Česky |
| `sk` | Slovenčina |
| `pl` | Polski |
| `ru` | Русский |
| `zh` | 简体中文 |
| `zh-TW` | 繁體中文 |
| `it` | Italiano |
| `tr` | Türkçe |
| `ar` | العربية |
| `az` | Azərbaycanca |
| `id` | Bahasa Indonesia |
| `ja` | 日本語 |
| `ko` | 한국어 |
| `th` | ไทย |
| `uk` | Українська |
| `gr` | Ελληνικά |
| `sv` | Svenska |
| `vi` | Tiếng Việt |
| `ca` | Català |
## Place names in another language
Place search, suggestions, place details and addresses follow the app language by default. **Settings → General → Language & region → Place names** lets them answer in another language while the interface stays in yours, for example English place names in a German app. Where a place has no name in the chosen language, its local name is shown. See [Display-Settings](Display-Settings#place-names).
## RTL support
Arabic (`ar`) uses a right-to-left layout. All other languages use left-to-right. In Arabic, spacing, indents, alignment and the corners of cards and menus follow the reading direction; maps, timelines and other things placed by position stay as they are.
## Counts
Texts that count something use the forms each language has for numbers: one place and five places in English, and the separate forms Russian, Polish, Czech, Ukrainian and Arabic use for 2, 5 or 21 of something. Languages without plural forms, such as Japanese or Chinese, use one form for every number.
## How language is detected
TREK resolves the display language in this order:
1. **User preference** — the language saved to your account (set in Settings → General).
2. **Browser language** — `navigator.languages` (and `navigator.language`) reported by your browser.
3. **Server default** — the `DEFAULT_LANGUAGE` environment variable set by the admin.
4. **Fallback** — English (`en`).
## Where the language picker appears
- **Login / Register page** — before you are signed in.
- **Settings → General** — after you are signed in. See [Display-Settings](Display-Settings).
- **Public share pages** — trip share links.
- **Public journey pages** — public-facing journey views.
> **Admin:** The `DEFAULT_LANGUAGE` environment variable sets the fallback language shown on the login page and for unauthenticated users. See [Environment-Variables](Environment-Variables).
## See also
- [Display-Settings](Display-Settings)
- [Environment-Variables](Environment-Variables)
- [User-Settings](User-Settings)