bundle/Templating/Twig/Extension/SiteRuntime.php
public function getLanguageName(string $languageCode): string
    {
        $posixLanguageCode = $this->localeConverter->convertToPOSIX($languageCode);
        if ($posixLanguageCode === null) {
            return '';
        }

        $posixLanguageCode = mb_substr($posixLanguageCode, 0, 2);
        $languageName = Intl::getLanguageBundle()->getLanguageName($posixLanguageCode, null, $posixLanguageCode);

        return ucwords($languageName);
    }
public function getLanguageName(string $languageCode): string
    {
        $posixLanguageCode = $this->localeConverter->convertToPOSIX($languageCode);
        if ($posixLanguageCode === null) {
            return '';
        }

        $posixLanguageCode = mb_substr($posixLanguageCode, 0, 2);
        $languageName = Intl::getLanguageBundle()->getLanguageName($posixLanguageCode, null, $posixLanguageCode);

        return ucwords($languageName);
    }
public function getLanguageName ( string $ languageCode ) : string { $ posixLanguageCode = $ this -> localeConverter -> convertToPOSIX ( $ languageCode ) ; if ( $ posixLanguageCode === null ) { return '' ; } $ posixLanguageCode = mb_substr ( $ posixLanguageCode , 0 , 2 ) ; $ languageName = Intl :: getLanguageBundle ( ) -> getLanguageName ( $ posixLanguageCode , null , $ posixLanguageCode ) ; return ucwords ( $ languageName ) ; }
Returns the language name for specified language code.
Returns the language name for specified language code .