main/core/Listener/PlatformListener.php
public function setLocale(GetResponseEvent $event)
    {
        if ($event->isMasterRequest()) {
            $request = $event->getRequest();

            $locale = $this->localeManager->getUserLocale($request);
            $request->setLocale($locale);
        }
    }
public function setLocale(GetResponseEvent $event)
    {
        if ($event->isMasterRequest()) {
            $request = $event->getRequest();

            $locale = $this->localeManager->getUserLocale($request);
            $request->setLocale($locale);
        }
    }
public function setLocale ( GetResponseEvent $ event ) { if ( $ event -> isMasterRequest ( ) ) { $ request = $ event -> getRequest ( ) ; $ locale = $ this -> localeManager -> getUserLocale ( $ request ) ; $ request -> setLocale ( $ locale ) ; } }
Sets the platform language.

@DI\Observe("kernel.request", priority = 17)

@param GetResponseEvent $event
Sets the platform language .