Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default to Browser Language Setting #9062

Open
Tracked by #9060
HIM92 opened this issue Aug 29, 2024 · 0 comments · May be fixed by #10237
Open
Tracked by #9060

Default to Browser Language Setting #9062

HIM92 opened this issue Aug 29, 2024 · 0 comments · May be fixed by #10237

Comments

@HIM92
Copy link

HIM92 commented Aug 29, 2024

Description

Context:
To improve user experience, the platform should automatically detect the user's default browser language and adjust the website language accordingly if it is supported.

Feature Description:
Implement functionality that checks the user's browser language settings (for major browsers such as Chrome, Edge, Safari, Firefox) and automatically sets the website language to match if the language is supported.

Requirements:

  1. Language Detection:

    • Detect the user's default language setting from their browser upon their first visit.
    • If the detected language is supported by the platform, automatically translate the website to that language.
  2. Language Selection:

    • Display the selected language at the top of the navigation bar.
    • Allow users to manually change the language through the language selection dropdown, which should still be available.
  3. Fallback:

    • If the browser's default language is not supported, default to English (or another preferred fallback language) and display this option in the language selection dropdown.

Project Owner

@HIM92

Bucket ID

#9060

User Stories / Acceptance Criteria

As a user on Common with my browser's language set to German, when I visit commonwealth.im, the website should automatically display in German. When I check the language setting in the navigation bar, I should see that German has been pre-selected, with the option to change the language if desired.

Design Devlink

https://www.figma.com/design/Hp5RCRDFoZf07WxLKJx2Pb/Internationalization?node-id=1-54&node-type=CANVAS&t=87lZ0TZRhptMaf4m-0

Design Screenshot

No response

Additional Context

No response

@HIM92 HIM92 added this to the International Language Support milestone Aug 29, 2024
devin-ai-integration bot added a commit that referenced this issue Dec 11, 2024
- Implement getBrowserLanguage to detect and validate browser language
- Add initializeLanguage to set initial language preference
- Add unit tests for language detection
- Initialize language on app start

Closes #9062

Co-Authored-By: Dillon Chen <[email protected]>
@devin-ai-integration devin-ai-integration bot linked a pull request Dec 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant