/** * Processes the locale updates. Adds listener for the cookie and updates the session. * * @param FilterLocaleSwitchEvent $event */ public function onLocaleChange(FilterLocaleSwitchEvent $event) { $this->locale = $event->getLocale(); $this->updateCookie($event->getRequest(), $this->localeCookie->setCookieOnChange()); $this->updateSession(); }