private function getDenormalizedLocaleFromTypo3(Request $request): ?string
    {
        if ((bool) $language = $request->attributes->get('language')) {
            /* @var SiteLanguage $language */
            return \trim($language->getBase()->getPath(), '/');
        }

        if ((bool) $site = $request->attributes->get('site')) {
            /* @var Site $site */
            return \trim($site->getDefaultLanguage()->getBase()->getPath(), '/');
        }

        return null;
    }
private function getDenormalizedLocaleFromTypo3(Request $request): ?string
    {
        if ((bool) $language = $request->attributes->get('language')) {
            /* @var SiteLanguage $language */
            return \trim($language->getBase()->getPath(), '/');
        }

        if ((bool) $site = $request->attributes->get('site')) {
            /* @var Site $site */
            return \trim($site->getDefaultLanguage()->getBase()->getPath(), '/');
        }

        return null;
    }
private function getDenormalizedLocaleFromTypo3 ( Request $ request ) : ? string { if ( ( bool ) $ language = $ request -> attributes -> get ( 'language' ) ) { /* @var SiteLanguage $language */ return \ trim ( $ language -> getBase ( ) -> getPath ( ) , '/' ) ; } if ( ( bool ) $ site = $ request -> attributes -> get ( 'site' ) ) { /* @var Site $site */ return \ trim ( $ site -> getDefaultLanguage ( ) -> getBase ( ) -> getPath ( ) , '/' ) ; } return null ; }
Tries to get a denormalized locale for routing resolved from the base path.

It is assumed here, that every site configuration has the locale as base path only.
Tries to get a denormalized locale for routing resolved from the base path .