This guide describes how to add a new officially supported UI language.
Language support crosses the frontend and Rust app layer:
- the frontend owns i18next resources and renders translated strings;
- the Rust app layer owns first-run language fallback through
SUPPORTED_LANGUAGES; - Settings persists the selected language through
settings.json.
When adding a language, update both frontend and Rust support together.
Use a stable short language code such as en, ja, or ru.
The current implementation stores this code directly in Settings and uses it as
the i18next resource key. If a future language needs a regional code, check the
Rust locale extraction logic in src-tauri/src/services/language_service.rs
before choosing the code.
-
Add
src/lang/<code>.json.Use
src/lang/en.jsonas the source structure. Keep the same key hierarchy and includelang.<code>so the Settings language selector can show the language name. -
Register the resource in
src/lib/i18n.ts.Import the JSON file and add it to the
resourcesobject:import xx from "@/lang/xx.json"; const resources = { // existing languages... xx: { translation: xx, }, };
-
Add the resource type in
src/types/i18next.d.ts.Import the JSON type and add it to the
Resourcestype. -
Add the language code to Rust
SUPPORTED_LANGUAGES.Update
src-tauri/src/services/language_service.rsso first-run OS language fallback recognizes the new language as officially supported. -
Update Rust language service tests.
Add a test matching the existing
supported_languages_contains_*tests insrc-tauri/src/services/language_service.rs. -
Update frontend i18n tests.
Add a resource-bundle assertion in
src/lib/i18n.test.ts. If the new language intentionally relies on English fallback for some keys, add a focused fallback assertion. -
Check locale-sensitive formatting.
Search for code that branches on
settings.language. Some process and history table code currently choosesja-JPoren-USexplicitly. Update those call sites if the new language needs a locale-specific formatter. -
Check Settings UI.
LanguageSelectderives available options from registered i18next resources. After step 2, the new language should appear automatically.
Run the relevant checks from the repository root:
npm test
cargo tauri-testIf the translation changes UI layout-sensitive text, manually inspect the Settings screen and any updated feature screens.