Skip to content

feat(i18n): default to Simplified Chinese when system language is zh - #3407

Open
988hj7tczd-oss wants to merge 1 commit into
different-ai:devfrom
988hj7tczd-oss:i18n/default-zh-locale
Open

feat(i18n): default to Simplified Chinese when system language is zh#3407
988hj7tczd-oss wants to merge 1 commit into
different-ai:devfrom
988hj7tczd-oss:i18n/default-zh-locale

Conversation

@988hj7tczd-oss

Copy link
Copy Markdown

Summary

When no stored language preference exists, initLocale currently always returns "en". This makes first-run Chinese users see an English UI even though a complete Simplified Chinese translation ships with the app.

This change follows the browser/system language instead: if it starts with zh, default to zh (Simplified Chinese); otherwise fall back to en.

  • Users can still switch manually via Settings > Appearance > Language
  • A stored preference (localStorage openwork.language) always takes priority
  • No behavior change for English users

Only apps/app/src/i18n/index.ts is modified (11 insertions). No other files touched.

@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-landing Ready Ready Preview, v0 Aug 1, 2026 9:27am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
openwork-diagnostics Skipped Skipped Aug 1, 2026 9:27am

@vercel
vercel Bot temporarily deployed to Preview – openwork-diagnostics August 1, 2026 03:17 Inactive
@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

@988hj7tczd-oss is attempting to deploy a commit to the Different AI Team on Vercel.

A member of the Team first needs to authorize it.

@988hj7tczd-oss

Copy link
Copy Markdown
Author

Hi @benjaminshafii 👋

Small follow-up on this one: when no stored language preference exists, initLocale defaults to English. This PR makes Chinese-system users start in Simplified Chinese (the complete zh translation already ships with the app). It's only 11 lines in index.ts, no behavior change for English users.

Let me know if anything needs adjusting. Thanks!

When no stored language preference exists, initLocale currently always
returns "en". This makes first-run Chinese users see an English UI even
though a complete Simplified Chinese translation is shipped.

Follow the browser/system language instead: if it starts with "zh",
default to "zh" (Simplified Chinese), otherwise fall back to "en".
Users can still switch manually via Settings > Appearance > Language,
and the stored preference always takes priority.
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.

1 participant