Open aik099 opened 6 years ago
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 https://github.com/schmittjoh/JMSI18nRoutingBundle/issues/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/schmittjoh/JMSI18nRoutingBundle/issues/230 .
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.