From: Raphaƫl Gertz Date: Tue, 23 Feb 2021 23:44:00 +0000 (+0100) Subject: Remove locale detection X-Git-Url: https://git.rapsys.eu/airbundle/commitdiff_plain/7a7defccded573430fd48d7c22d5f0229cedf50d?ds=sidebyside;hp=0d312015fc7374f90916c55f7665a3bbec7dd5e2 Remove locale detection Google indexing fail miserably with magic locale detection --- diff --git a/EventSubscriber/LocaleSubscriber.php b/EventSubscriber/LocaleSubscriber.php index 2d25ba6..5975bd3 100644 --- a/EventSubscriber/LocaleSubscriber.php +++ b/EventSubscriber/LocaleSubscriber.php @@ -34,22 +34,22 @@ class LocaleSubscriber implements EventSubscriberInterface { $request->getSession()->set('_locale', $preferred); //Send vary header as current page locale depend on it - header('Vary: accept-language'); + #header('Vary: accept-language'); //Set locale - $request->setLocale($preferred); + #$request->setLocale($preferred); //Set default locale - $request->setDefaultLocale($preferred); + #$request->setDefaultLocale($preferred); //Get router context - $context = $this->router->getContext(); + #$context = $this->router->getContext(); //Set context locale - $context->setParameter('_locale', $preferred); + #$context->setParameter('_locale', $preferred); //Set back router context - $this->router->setContext($context); + #$this->router->setContext($context); //End process return;