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

accept-language header overriding query parameter and other methods to set the local #94

Open
Spouwny opened this issue Apr 27, 2016 · 3 comments

Comments

@Spouwny
Copy link

Spouwny commented Apr 27, 2016

Getting www.test.com?lang=en with the header accept-language="fr" will be displayed in "fr".

I don't know if this is intended, but overriding user preference seems odd to me.

It seems related to #36

@gjuchault
Copy link
Collaborator

Why would ?lang=en be a user preference ?
We should think of a ranking system, but it seems weird to have a user adding himself ?lang=en in his bar. You could use cookie or another way to do that

@Spouwny
Copy link
Author

Spouwny commented May 24, 2016

The term "user preference" is poorly choosen and the way to set this preference has nothing to do with the issue.

The issue is that the result of GET http://www.test.com?lang=en may be in an other language than specified by the url.

This could be really confusing. Visible settings should have the priority on invisible ones.

@Spouwny Spouwny changed the title accept-language header overriding quey parameter and other methods to set the local accept-language header overriding query parameter and other methods to set the local May 24, 2016
@gjuchault
Copy link
Collaborator

I agree with that but I'm struggling with time :/.

Netgator added a commit to Netgator/i18n-node-2 that referenced this issue Mar 6, 2019
Explicit language parameter in query, domain or session must have precedence over "preferred" language present in the "Accept-Language" header.
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

No branches or pull requests

2 participants