src/Sulu/Component/Localization/Provider/LocalizationProvider.php
private function parse($locale)
    {
        $parts = explode('_', $locale);

        $localization = new Localization();
        $localization->setLanguage($parts[0]);
        if (count($parts) > 1) {
            $localization->setCountry($parts[1]);
        }

        return $localization;
    }
private function parse($locale)
    {
        $parts = explode('_', $locale);

        $localization = new Localization();
        $localization->setLanguage($parts[0]);
        if (count($parts) > 1) {
            $localization->setCountry($parts[1]);
        }

        return $localization;
    }
private function parse ( $ locale ) { $ parts = explode ( '_' , $ locale ) ; $ localization = new Localization ( ) ; $ localization -> setLanguage ( $ parts [ 0 ] ) ; if ( count ( $ parts ) > 1 ) { $ localization -> setCountry ( $ parts [ 1 ] ) ; } return $ localization ; }
Converts locale string to localization object.

@param string $locale E.g. de_at or de

@return Localization
Converts locale string to localization object .