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

Don't set "hl" cookie not using "prefix" strategy #210

Open
aik099 opened this issue Sep 22, 2017 · 1 comment · May be fixed by #228
Open

Don't set "hl" cookie not using "prefix" strategy #210

aik099 opened this issue Sep 22, 2017 · 1 comment · May be fixed by #228

Comments

@aik099
Copy link

aik099 commented Sep 22, 2017

The comments in code about hl cookie says that it's used in custom strategy where each language has own sub-domain.

In reality however that cookie is set in prefix strategy as well and in there it's better to use default locate when not specified in url rather than previously used locale, that is coming from cookie.

@gitcerizead
Copy link

gitcerizead commented Nov 30, 2018

Hmm, I confess to be relying on this feature, because I thought it formed part of a wider (undocumented) "sticky locale" mechanism that this bundle uses; see #229 .

However, it's certainly the case that the stickiness is achieved through the use of the cookie alone (not, for example, the session var), which might indicate that the stickiness feature is not really intended; in which case the use of the cookie for the 'prefix' and 'prefix_except_default' strategies is indeed a bug.

[If the stickiness feature is intended, then I suggest using the session var for it as well, and then making the feature more configurable (including the ability to disable the use of the cookie); see my feature request at https://github.com//issues/230 .

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 a pull request may close this issue.

2 participants