Skip to content

App language switching does not work reliably #21

Description

@ElninoZhong

Hi team, I ran into a language switching issue in the app client (app.team9.ai), not on the marketing site.

On the public website, language switching seems to work, but inside the app the behavior appears broken or inconsistent.

From the client code, these parts look worth checking:

  • In apps/client/src/i18n/index.ts, language detection config exists, but LanguageDetector is commented out:
    // .use(LanguageDetector)
  • The config suggests language should be restored from localStorage, but without the detector plugin actually enabled, persistence / restore may not work correctly.
  • In MainSidebar.tsx, the language menu also seems to hard-hide the zh option in one place, which may make switching behavior incomplete.

Suggested fix

  • Enable i18next-browser-languagedetector
  • Restore language from localStorage on app boot
  • Ensure both zh and en are selectable in the app UI
  • Add a regression test for:
    • switch language
    • reload app
    • confirm the selected language persists

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions