Docs
Localization
Where the strings of OSAGI Console live, how dates, numbers and money are formatted, and how to add a language without an i18n framework.
The console ships in English. There is no i18n framework on purpose: strings are plain TypeScript, so a translation changes files, not the architecture.
Where the strings live
| Strings | Where |
|---|---|
| Shell, navigation, chat and docs texts | The dictionary in lib/i18n |
| Texts of a module screen | Next to its components and view models (components/<module>, lib/<module>) |
| Permission labels | lib/auth/perms.ts |
| Demo data | lib/mock/fixtures/* and lib/mock/snapshots/* |
| These docs pages | The docs store, seeded from lib/mock/fixtures/docs.ts |
Dates, numbers and money
- Numbers and dates go through
Intlwith theen-USlocale:1,284,$1,284,Oct 14, 2026, times on a 24-hour clock (14:32). date-fnsformats with itsenUSlocale.- One time zone serves the report screens, the overview and the freshness badges: set
NEXT_PUBLIC_REPORT_TIME_ZONEat build time to an IANA name (Asia/Dubai,America/Bogota); unset or unknown meansUTC.lib/config/time.tsreads it intoREPORT_TIME_ZONEand derivesREPORT_UTC_OFFSET;lib/modules/shared.tsre-exports both next toREPORT_LOCALE. Report producers write timestamps without a zone and report days are counted with one fixed offset, so a zone whose offset changed or changes on any day since 2000 (daylight saving time inEurope/Berlin, Ramadan time inAfrica/Casablanca, the move ofAsia/Almatyin 2024) falls back toUTCas well, as OSAGI Backend Starter refuses it. - Plural forms come from
Intl.PluralRules(lib/modules/text.ts).
Adding a language
- Translate the
lib/i18ndictionary and the module texts; keep the keys. - Switch the locale:
REPORT_LOCALE, thedate-fnslocale imports and thelangthat each root layout passes toRootDocument(app/(console)/layout.tsx,app/(auth)/layout.tsx,app/(marketing)/layout.tsx). - Give every plural category of your language a form:
PluralFormsinlib/modules/text.tshas two forms (one, other) and needs as many asIntl.PluralRulesreturns for your locale. - Check long words: German or French strings run up to a third longer. Screens wrap, but buttons and pills deserve a look at 390 px.
- Run
pnpm testand walk through the screens in both themes.