protected function determineLocale(GetResponseEvent $event)
    {
        $locale = $event->getRequest()->getLocale();

        return in_array($locale, $this->allowedLocales) ?
            $locale :
            null;
    }