PHP Class infoweb\cms\helpers\LanguageHelper

Afficher le fichier Open project: infoweb-internet-solutions/yii2-cms Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

getLanguage() public static méthode

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

getLanguageCodeParts() public static méthode

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

isRtl() public static méthode

Check if language is an rtl language
public static isRtl ( $language ) : boolean
$language
Résultat boolean