concrete/src/Entity/LocaleTrait.php
public function getLanguageText($locale = null)
    {
        try {
            $text = PunicLanguage::getName($this->getLanguage(), $locale ?: '');
        } catch (Exception $e) {
            $text = $this->getLanguage();
        } catch (Throwable $e) {
            $text = $this->getLanguage();
        }

        return $text;
    }
public function getLanguageText($locale = null)
    {
        try {
            $text = PunicLanguage::getName($this->getLanguage(), $locale ?: '');
        } catch (Exception $e) {
            $text = $this->getLanguage();
        } catch (Throwable $e) {
            $text = $this->getLanguage();
        }

        return $text;
    }
public function getLanguageText ( $ locale = null ) { try { $ text = PunicLanguage :: getName ( $ this -> getLanguage ( ) , $ locale ? : '' ) ; } catch ( Exception $ e ) { $ text = $ this -> getLanguage ( ) ; } catch ( Throwable $ e ) { $ text = $ this -> getLanguage ( ) ; } return $ text ; }
Get the display name of this locale.

@param string|null $locale The locale to be used to localize the locale name

@return string

@example <code>getLanguage('en_US')</code> returns the display name of this locale in American English
@example <code>getLanguage('it_IT')</code> returns the display name of this locale in Italian
@example <code>getLanguage()</code> returns the display name of this locale in the currently active locale
Get the display name of this locale .