#10657: feat(ui): add i18n support with English, Chinese, and Portuguese
app: web-ui
Cluster:
Multilingual Support Enhancements
Closes #3460
This PR implements a robust, reactive i18n system for the OpenClaw Control UI.
### Key Changes:
- **Core i18n Architecture**: A new reactive i18n manager using Lit controllers for instant UI updates.
- **Multi-language Support**: Initial translations for English (en), Simplified Chinese (zh-CN), Traditional Chinese (zh-TW), and Brazilian Portuguese (pt-BR).
- **UI Integration**:
- Added a language selector in the Overview tab.
- Localized the sidebar, navigation tabs, page headers, and chat controls.
- Persistent language preference via `UiSettings`.
- **Extensibility**: Clean structure for easy community contributions of new languages.
### Verification:
- Verified with `pnpm build` to ensure no regressions or dynamic import warnings.
- Added unit tests for the translation logic.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
- Introduces a new `ui/src/i18n/*` module with a reactive `I18nManager`, locale definitions (en/zh-CN/zh-TW/pt-BR), and a Lit `I18nController` for automatic re-render on language changes.
- Wires translations into core UI rendering (navigation labels, tab titles/subtitles, overview copy, chat control tooltips) via `t(...)` calls.
- Persists user locale preference in `UiSettings` and initializes the i18n manager from stored settings.
- Adds unit tests covering basic translation and parameter interpolation behavior.
<h3>Confidence Score: 3/5</h3>
- This PR is mostly safe but has a couple of correctness issues in i18n loading/testing that should be fixed before merging.
- Main risk is the i18n manager’s unconditional use of browser globals at module init (can hard-crash in non-browser contexts) and a locale loading path that can silently fail, plus a unit test that doesn’t actually validate the intended fallback behavior. UI integration changes are otherwise straightforward string substitutions.
- ui/src/i18n/lib/translate.ts, ui/src/i18n/test/translate.test.ts, ui/src/ui/app.ts
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#13622: feat(i18n): add complete multi-language support (EN, TR, FR, DE)
by vaur94 · 2026-02-10
87.7%
#10586: feat: Add Chinese (zh-CN) localization support
by Maxsong-0 · 2026-02-06
87.6%
#9490: Add Internationalization (i18n) Support
by luuman · 2026-02-05
86.2%
#10275: feat: add multiligual support for UI
by fmyuan2000 · 2026-02-06
81.9%
#22332: i18n: add Korean (ko-KR) locale support
by arusia88 · 2026-02-21
81.5%
#22165: feat(i18n): translate hardcoded button labels to all 4 locales
by NikolaVujovic1988 · 2026-02-20
79.2%
#21619: fix(i18n): load saved locale translations on page refresh
by zerone0x · 2026-02-20
76.8%
#20905: i18n: add bulgarian to openclaw
by Lutherwaves · 2026-02-19
76.6%
#22570: feat(i18n): add Korean (ko) locale to Control UI
by hoonsikim · 2026-02-21
76.2%
#21988: feat(i18n): added Thai (th) locale
by samithiwat · 2026-02-20
75.3%