PHP Class infoweb\cms\helpers\LanguageHelper

Exibir arquivo Open project: infoweb-internet-solutions/yii2-cms Class Usage Examples

Public Methods

Method Description
getCountry ( $language = null ) : string Returns only the country part of the language code.
getLanguage ( $language = null ) : string Returns only the language part of the provided or current language code.
getLanguageCodeParts ( $language = null ) : array Returns the different parts of the provided or current language code.
isRtl ( $language ) : boolean Check if language is an rtl language

Method Details

getCountry() public static method

"en-US" => 'us'
public static getCountry ( $language = null ) : string
return string

getLanguage() public static method

"en-US" => 'en'
public static getLanguage ( $language = null ) : string
return string

getLanguageCodeParts() public static method

"en-US" => ['en', 'us']
public static getLanguageCodeParts ( $language = null ) : array
return array

isRtl() public static method

Check if language is an rtl language
public static isRtl ( $language ) : boolean
$language
return boolean