public function getLanguage($languageCode = null): ?string
    {
        $languageCode = $languageCode ? mb_strtoupper($languageCode) : null;

        return $this->get("languages.{$languageCode}") ?: (current($this->get('languages', [])) ?: null);
    }
public function getLanguage($languageCode = null): ?string
    {
        $languageCode = $languageCode ? mb_strtoupper($languageCode) : null;

        return $this->get("languages.{$languageCode}") ?: (current($this->get('languages', [])) ?: null);
    }
public function getLanguage ( $ languageCode = null ) : ? string { $ languageCode = $ languageCode ? mb_strtoupper ( $ languageCode ) : null ; return $ this -> get ( "languages.{$languageCode}" ) ? : ( current ( $ this -> get ( 'languages' , [ ] ) ) ? : null ) ; }
Get the given language or fallback to first language.

@param string|null $languageCode

@return string|null
Get the given language or fallback to first language .