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

Use browser's language preferences where possible #8

Open
hughbris opened this issue Nov 8, 2013 · 0 comments
Open

Use browser's language preferences where possible #8

hughbris opened this issue Nov 8, 2013 · 0 comments

Comments

@hughbris
Copy link
Collaborator

hughbris commented Nov 8, 2013

This is a fancy nice-to-have. If we support more than one language, it would be optimal to look at the User Agent accept-language headers and see if we can accommodate those. Some thought required on the logic before commencing. Something like:

  • get the UA language preferences
  • see if they have translations here
  • yes and already in $languages: move preferred languages to top in order
  • yes and not in $languages: add supported preferences to head of list, retain current first/default
  • no: do nothing

There are more complex scenarios than that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant