Skip to content

feat(i18n): add Chinese localization with language toggle in navbar#220

Open
QingJ01 wants to merge 1 commit into
tashfeenahmed:mainfrom
QingJ01:feat/i18n-chinese
Open

feat(i18n): add Chinese localization with language toggle in navbar#220
QingJ01 wants to merge 1 commit into
tashfeenahmed:mainfrom
QingJ01:feat/i18n-chinese

Conversation

@QingJ01

@QingJ01 QingJ01 commented Jun 5, 2026

Copy link
Copy Markdown

Summary

  • Add lightweight i18n system using React Context (zero external dependencies)
  • ~180 translation keys covering all dashboard pages in both English and Chinese
  • Auto-detects browser language on first visit, persisted to localStorage
  • Language toggle button (中/EN) in dashboard top bar, next to dark mode toggle

Changes

  • New: client/src/i18n/context.tsx — I18nProvider + useI18n() hook
  • New: client/src/i18n/en.ts — English translations dictionary
  • New: client/src/i18n/zh.ts — Chinese (简体中文) translations dictionary
  • Modified: App.tsx — wrap with I18nProvider, add LanguageToggle button
  • Modified: All page components use t() for user-facing strings
  • Modified: auth-gate.tsx, models-tabs.tsx use translations

Test plan

  • TypeScript compiles with zero errors
  • Vite production build succeeds
  • Dev server starts correctly
  • Language toggle switches all UI text between EN and ZH

- Add lightweight i18n React Context provider (no external deps)
- ~180 translation keys covering all pages (en + zh)
- Auto-detect browser language on first visit
- Language toggle button (中/EN) in dashboard top bar
- Translate all pages: Keys, Fallback, Playground, Analytics, Embeddings
- Translate auth gate, models tabs, and floating bar components

Co-Authored-By: DeepSeek V4 Pro (1M context) <noreply@anthropic.com>
@wells1013

Copy link
Copy Markdown

good job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants