Localization and language experience
Omarchy gives users a localized desktop without tying the display language to every regional format. A language choice drives translated menus, shell text, command output, and the session language, while a separate region choice can control dates, numbers, money, units, and paper formats. The locale setup and translation runtime page describes the setup and runtime flows in detail.
Localization model
The localization model joins four related concerns: a supported language, a generated system locale, translation catalogs, and session environment values. This lets Omarchy show a translated interface while keeping language messages and regional formatting as separate user choices.
| Concern | User-visible effect | Main source of truth |
|---|---|---|
| Language | Interface text, command messages, and LANG | default/…/locales.json and the user's language file |
| Region | Date, time, number, money, unit, and paper formats | default/…/regions.json and the region session file |
| Catalog | Translated menu, shell, keybinding, and command strings | default/i18n/<code>/ |
| Locale | System data needed by language and format settings | The packaged locale registries and the system locale archive |
The system locale is generated only for a registry-backed language or region. The installed system base remains English by default, while a user's selected language is applied per session. This keeps console and early system output usable even when the user's desktop uses another script. install/…/locale.sh• L13-50 and install/…/language.sh• L1-13 define this boundary.
References: default/…/locales.json• L1-406 default/…/regions.json• L1-26 install/…/locale.sh• L13-50 install/…/language.sh• L1-13
Language selection
The language selector uses the shared registry to present native names, stable codes, and English names. A selected code is saved for the user only after its locale exists, so a failed or cancelled locale request does not leave a partial language change.
The language experience has two time frames:
- Next login: the selected code and its
LANGvalue are written to the user's configuration. - Current session: the same values are handed to the running desktop so new applications can use them.
Existing applications keep the environment they received when they started. The interface itself can update sooner because its catalog reader watches the language choice directly. bin/omarchy-language#L19-L33 and bin/omarchy-language#L85-L108 own the selection contract.
Installation can provide a language preset. The system stage generates its locale, then the user stage seeds the choice only when the user has not already selected a language. A preset therefore supplies a default and does not replace a user's choice. install/…/language.sh• L1-7 and bin/omarchy-language#L117-L130 define this behavior.
References: bin/omarchy-language• L19-55 bin/omarchy-language• L85-108 bin/omarchy-language• L117-142 install/…/language.sh• L1-7
Translation catalogs
Translation catalogs are JSON maps from stable keys to user-facing text. English is the source catalog and the fallback when a selected language has no value for a key, so an incomplete translation remains usable while the translation work catches up. The catalog set covers the shell, command output, menus, and keybinding descriptions. scripts/i18n-sync.py• L111-140 defines these translation units.
Catalog strings use %1-style placeholders. The translated sentence may move a placeholder, but it must preserve the value so each language can use its own word order. Count-based strings use plural forms rather than English-only singular branches. The shared plural rules keep shell and command output aligned. default/i18n/plural.jq#L5-L43 and shell/…/Plural.js• L12-86 define that common contract.
Translation freshness is tracked against the English source. The manifest records a source hash for each catalog unit and manual chapter, which allows the sync process to find missing or stale work without blocking the English interface. scripts/i18n-sync.py• L15-18 and scripts/i18n-sync.py• L147-173 define this model.
References: default/…/menu.json• L1-5 default/…/shell.json• L1-5 default/…/cli.json• L1-5 default/…/keybindings.json• L1-5 default/…/translation-manifest.json• L1-8 scripts/i18n-sync.py• L111-140 scripts/i18n-sync.py• L147-173
Regional metadata
The language registry carries metadata that affects how the localized experience reads. Each language maps a user-facing code to a native name, an English name, a BCP 47 format locale, a generated system locale, a decimal mark, and a zero digit. Right-to-left languages also mark text direction so the shell can mirror its layout.
Regional format choices are separate from translated messages. A region sets LC_TIME, LC_NUMERIC, LC_MONETARY, LC_MEASUREMENT, and LC_PAPER; it does not replace LANG or LC_MESSAGES. The default removes those overrides and makes formats follow the selected language again. bin/omarchy-region#L15-L27 and bin/omarchy-region#L92-L107 define this relationship.
The shell uses the registry's format locale for dates and month names. It uses the decimal mark and zero digit for displayed numbers. This avoids a mismatch where the interface language says one thing but date or number output follows an unrelated inherited process locale. shell/Commons/I18n.qml#L22-L28 and shell/…/Numbers.js• L1-14 provide the shared metadata surface.
References: default/…/locales.json• L1-9 default/…/locales.json• L284-291 default/…/regions.json• L1-26 bin/omarchy-region• L15-27 bin/omarchy-region• L63-107 shell/…/I18n.qml• L22-28 shell/…/Numbers.js• L1-14
Runtime language loading
Omarchy loads language data at the point where text is shown. The shell watches the user's language file and layers the selected shell catalog over English, so bindings re-render after a language change. Command surfaces use the same language file and select the matching CLI catalog for each invocation.
The runtime path keeps fallback behavior local to each surface:
- The shell uses its selected catalog, then English, then an optional caller-provided English fallback.
omarchy-i18nuses the selected CLI catalog, then English, then the key itself.- A plugin can use its own catalogs and fall back from a regional language to its base language, then English.
The shell and command path share the registry for language metadata and the plural rules for count-based text. The shell additionally exposes right-to-left layout state and number formatting through its i18n singleton. shell/Commons/I18n.qml#L30-L65, bin/omarchy-i18n#L47-L85, and shell/Commons/Translations.qml#L16-L59 define these runtime contracts.
The session hand-off has two stages. The selected LANG is stored for the next login, then locale values are sent to the running Hyprland session. Hyprland passes new values to the systemd and D-Bus activation environments, and the shell is restarted so applications launched from it inherit them. Applications that are already open keep the environment they received at startup. bin/omarchy-language#L59-L69 and bin/omarchy-locale-session#L53-L71 define this boundary.
This diagram shows how a language choice reaches translated text and newly launched applications.
flowchart LR
A[Language choice] --> B[Language registry]
B --> C[Generate locale if needed]
C --> D[Save user language and LANG]
D --> E[Update running desktop environment]
D --> F[Shell watches language file]
F --> G[Selected catalog over English]
E --> H[New applications inherit LANG]
G --> I[Localized shell and menus]
References: shell/…/I18n.qml• L30-101 shell/…/Translations.qml• L16-87 bin/omarchy-i18n• L47-110 bin/omarchy-language• L59-108 bin/omarchy-locale-session• L53-71
Related pages
- Locale setup and translation runtime — locale generation, session activation, catalog loading, and command and shell consumers.
Change checklist
When these files or sections are changed, remember to consider these:
- Keep each language registry entry aligned with its generated locale, format metadata, catalog directory, and plural rules.
- Keep the shell plural rules and
default/i18n/plural.jqin agreement so the same count selects the same form in QML and commands. - Keep language persistence, session
LANG, and live shell reload aligned so new applications and the current interface do not diverge. - Keep region overrides limited to format categories so a region choice does not change translated messages.
- When an English catalog key changes, update its translation freshness record and preserve placeholder shape across all languages.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A language or region is not in the packaged registry | Locale generation rejects the choice and the setting is not safely usable | Accept registry-backed codes only and validate the resolved locale before generation |
| Locale generation fails before the choice is saved | The user keeps the old language or format choice | Persist the setting only after the locale is available |
| A translated catalog omits a key or has stale source text | The affected text falls back to English or waits for sync | Layer English fallback and track source hashes in the manifest |
| The running session cannot accept a locale update | New applications keep the old environment and the shell is not refreshed | Apply values through the running desktop session and restart the shell after the update |
A regional format override sets LANG or LC_MESSAGES | The region can silently change interface language | Restrict region changes to the five format categories |
| A plural catalog does not provide the categories used by its language | Counts show the wrong form or fall back unexpectedly | Share category rules between shell and command runtimes and validate catalog shape |
Key files
| File | Why to read it |
|---|---|
| default/…/locales.json | Defines supported language codes and the metadata used by language and format behavior. |
| default/…/regions.json | Defines extra regional choices such as English variants. |
bin/omarchy-language | Shows how language selection, persistence, locale setup, and session LANG fit together. |
bin/omarchy-region | Shows how regional formats remain separate from language messages. |
bin/omarchy-i18n | Shows the command-side catalog, fallback, placeholder, plural, and number contract. |
shell/Commons/I18n.qml | Shows live shell catalog loading and shared language metadata. |
shell/Commons/Translations.qml | Shows how independent plugins follow the selected language. |
bin/omarchy-locale-session | Shows the shared locale generation and running-session hand-off boundary. |
| scripts/i18n-sync.py | Shows how English sources, translated units, and freshness records stay aligned. |