]> Raphaël G. Git Repositories - airbundle/commitdiff
Remove locale detection
authorRaphaël Gertz <git@rapsys.eu>
Tue, 23 Feb 2021 23:44:00 +0000 (00:44 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Tue, 23 Feb 2021 23:44:00 +0000 (00:44 +0100)
Google indexing fail miserably with magic locale detection

EventSubscriber/LocaleSubscriber.php

index 2d25ba6d714c61f36f58586e63a6636cae75d280..5975bd3ed58f1a1f775424b0f78c09b8e3edcdab 100644 (file)
@@ -34,22 +34,22 @@ class LocaleSubscriber implements EventSubscriberInterface {
                                $request->getSession()->set('_locale', $preferred);
 
                                //Send vary header as current page locale depend on it
                                $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
 
                                //Set locale
-                               $request->setLocale($preferred);
+                               #$request->setLocale($preferred);
 
                                //Set default locale
 
                                //Set default locale
-                               $request->setDefaultLocale($preferred);
+                               #$request->setDefaultLocale($preferred);
 
                                //Get router context
 
                                //Get router context
-                               $context = $this->router->getContext();
+                               #$context = $this->router->getContext();
 
                                //Set context locale
 
                                //Set context locale
-                               $context->setParameter('_locale', $preferred);
+                               #$context->setParameter('_locale', $preferred);
 
                                //Set back router context
 
                                //Set back router context
-                               $this->router->setContext($context);
+                               #$this->router->setContext($context);
 
                                //End process
                                return;
 
                                //End process
                                return;