From: Raphaƫl Gertz Date: Tue, 23 Feb 2021 23:44:00 +0000 (+0100) Subject: Remove locale detection X-Git-Tag: 0.2.1~42 X-Git-Url: https://git.rapsys.eu/airbundle/commitdiff_plain/c020bf6ea3a0c807cb6070a71d164de06f10f88c?hp=86fc42ff315b0f3a014ba308425787609175ab6d 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;