feat: add complete English and Simplified Chinese localization#247
Open
eachann1024 wants to merge 2 commits intodecolua:masterfrom
Open
feat: add complete English and Simplified Chinese localization#247eachann1024 wants to merge 2 commits intodecolua:masterfrom
eachann1024 wants to merge 2 commits intodecolua:masterfrom
Conversation
- add bilingual support for dashboard and landing pages - persist locale selection with cookie-based switching - keep existing routes and API paths unchanged
decolua
pushed a commit
that referenced
this pull request
Mar 6, 2026
…se support
- Implement runtime i18n using MutationObserver for automatic DOM translation
- Add language switcher dropdown in dashboard header (EN/VI/ZH)
- Support 3 languages: English (default), Tiếng Việt, 简体中文
- Add translation files: vi.json (197 entries), zh-CN.json (513 entries, cleaned)
- Translate dashboard UI: sidebar menu, header, settings, MITM page
- Use cookie-based locale persistence with /api/locale endpoint
- Zero component changes required - translations applied at runtime
- Fix Header flicker on route change with key={pathname}
Co-authored-by: eachann <each1024@qq.com>
Based on PR #247 from decolua/9router with runtime approach
Made-with: Cursor
Owner
|
Hi @eachann1024, Thank you for your excellent work on PR #247! 🎉 I've integrated i18n support into the main branch, but with a different approach to minimize code changes: What was implemented:✅ 3 languages: English (default), Tiếng Việt, 简体中文 Key differences from your PR:
Commit:
Your translation files ( The implementation is now live on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
next-intlas the primary i18n runtime in App Router with locale-aware root layout wiring./api/locale) and a reusable language switcher in landing and dashboard shells.enandzh-CNundersrc/i18n/messages.Validation
npm run buildnode /Users/eachann/Library/Mobile\ Documents/com~apple~CloudDocs/00000/LinkConfig/agents/skills/open-source-pr-guardrails/scripts/guardrail_check.mjs --phase repo --repo /Users/eachann/WorkMark/open-source/9router --fork-url https://github.com/eachann1024/9router.git --upstream-url https://github.com/decolua/9router.git --require-clean truenode /Users/eachann/Library/Mobile\ Documents/com~apple~CloudDocs/00000/LinkConfig/agents/skills/open-source-pr-guardrails/scripts/guardrail_check.mjs --phase commit --repo /Users/eachann/WorkMark/open-source/9router --mode range --base HEAD~1 --head HEAD --max-files 220 --max-top-level 4 --check-commit-messages true