schmittjoh / JMSI18nRoutingBundle

Allows you to internationalize your routing
http://jmsyst.com/bundles/JMSI18nRoutingBundle
358 stars 159 forks source link

Make the "sticky locale" functionality more configurable #230

Open gitcerizead opened 5 years ago

gitcerizead commented 5 years ago

Feature request

This bundle features a sophisticated sticky locale implementation, and the sticky locale is applied on routes for which "translation" (i18n) is disabled; see https://github.com/schmittjoh/JMSI18nRoutingBundle/issues/229 .

It would be great if this functionality could be more configurable. Sometimes I won't want to have cookies being set (see also https://github.com/schmittjoh/JMSI18nRoutingBundle/issues/210 ), for example. But the thing I'd most like to be able to configure is whether or not Accept-Language request headers are used. They are used in the current implementation, but there are situations in which I'd prefer to use the configured default language rather than rely on the (notoriously unreliable) Accept-Language header.

gitcerizead commented 5 years ago

On the other hand, the "stickiness" is achieved solely through the use of a cookie called 'hl', which may be being set in error (i.e. the stickiness feature may be a bug rather than a feature!). See #210 . But even it's decided to remove the stickiness feature, it would still be good to be able to configure how the default locale is determined for a route for which "translation" (i18n) is disabled, as per the description in this ticket.