Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Closed
Labels
Milestone
Description
https://symfony.com/doc/master/translation/locale.html
The custom listener must be calledbefore LocaleListener, which initializes the locale based on the current request. To do so, set your listener priority to a higher value than LocaleListener priority (which you can obtain running the debug:event kernel.request command).
And then in the linked example:
https://symfony.com/doc/master/session/locale_sticky_session.html
publicstaticfunctiongetSubscribedEvents() {returnarray(// must be registered after the default Locale listener KernelEvents::REQUEST =>array(array('onKernelRequest',15)), ); }
Documentation says (in bold) the custom listener must be registeredbefore the framework listener, the inline doc in the example saysafter, which is exactly the opposite.