Skip to content

Conversation

@afzal09
Copy link

@afzal09 afzal09 commented Dec 4, 2025

Proposed Changes

  • send accept language header with request for localized errors
  • get selected languages from user browser

Related Issue(s)

Closes Send selected language in request header #1132

Please check that the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)

}

export function getAcceptLanguage():string{
const languages = navigator.languages || []; // get language preference from user's browser settings
Copy link
Member

@rolandgeider rolandgeider Dec 5, 2025

Choose a reason for hiding this comment

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

I'm not sure right now, but where do the languages the languages in navigator come from? Are these only the ones set in the browser preferences?

In any case, the user can also manually change the app's language with the parameter in the URL, so we should make sure we send that one as the first entry (this can be read from useTranslation(), i18n.language)

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