Skip to content

feat(client): add Traditional Chinese (zh-TW) language support#612

Open
WeilJimmer wants to merge 2 commits intoEKKOLearnAI:mainfrom
WeilJimmer:main
Open

feat(client): add Traditional Chinese (zh-TW) language support#612
WeilJimmer wants to merge 2 commits intoEKKOLearnAI:mainfrom
WeilJimmer:main

Conversation

@WeilJimmer
Copy link
Copy Markdown

Update language switcher and i18n configuration to include Traditional Chinese. Modify locale resolution to prioritize exact matches (zh-TW) over base codes (zh), ensuring accurate browser language detection. Add complete translation set.

Update language switcher and i18n configuration to include Traditional Chinese.
Modify locale resolution to prioritize exact matches (zh-TW) over base codes (zh),
ensuring accurate browser language detection. Add complete translation set.

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings May 10, 2026 14:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Traditional Chinese (zh-TW) support to the client i18n system, including a full translation set and updated locale selection logic intended to prefer exact locale matches over base language codes.

Changes:

  • Added zh-TW locale messages and registered them in the i18n message map.
  • Extended supported locale list and updated locale resolution to check full BCP-47 tags before falling back to 2-letter language codes.
  • Updated the language switcher UI to expose both Simplified Chinese (zh) and Traditional Chinese (zh-TW).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/client/src/i18n/messages.ts Registers zh-TW messages and includes them in the merged runtime message set.
packages/client/src/i18n/locales/zh-TW.ts Adds the full Traditional Chinese translation dictionary.
packages/client/src/i18n/index.ts Extends supported locales and adjusts browser locale detection to prefer exact matches.
packages/client/src/components/layout/LanguageSwitch.vue Adds a zh-TW option and distinguishes Simplified vs Traditional Chinese labels.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/client/src/i18n/index.ts Outdated
Refactor resolveLocale to use a normalize helper that correctly maps BCP-47 tags to supported locale keys, properly distinguishing Traditional vs Simplified Chinese variants. Additionally, iterate over navigator.languages instead of relying solely on navigator.language to respect the browser's full language preference list.

Co-authored-by: Copilot <copilot@github.com>
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