Method | Description | |
---|---|---|
__construct ( SimpleSAML_Configuration $configuration ) | Constructor | |
getDefaultLanguage ( ) : string | Return the default language according to configuration. | |
getLanguage ( ) : string | This method will return the language selected by the user, or the default language. It looks first for a cached language code, then checks for a language cookie, then it tries to calculate the preferred language from HTTP headers. | |
getLanguageCodeAlias ( $langcode ) : string | Return an alias for a langcode, if any | |
getLanguageCookie ( ) : string | null | Retrieve the user-selected language from a cookie. | |
getLanguageList ( ) : array | Return an indexed list of all languages available. | |
getLanguageLocalizedName ( string $code ) : string | Get the localized name of a language, by ISO 639-2 code. | |
getLanguageParameterName ( ) : string | Get the language parameter name. | |
getPosixLanguage ( $language ) | * Rename to non-idiosyncratic language code | |
isLanguageRTL ( ) : boolean | Check whether a language is written from the right to the left or not. | |
setLanguage ( string $language, boolean $setLanguageCookie = true ) | This method will set a cookie for the user's browser to remember what language was selected. | |
setLanguageCookie ( string $language ) | This method will attempt to set the user-selected language in a cookie. It will do nothing if the language specified is not in the list of available languages, or the headers have already been sent to the browser. |
Method | Description | |
---|---|---|
getHTTPLanguage ( ) : string | This method returns the preferred language for the user based on the Accept-Language HTTP header. | |
getInstalledLanguages ( ) : array | Wash configured (available) languages against installed languages |
public __construct ( SimpleSAML_Configuration $configuration ) | ||
$configuration | SimpleSAML_Configuration | Configuration object |
public getDefaultLanguage ( ) : string | ||
return | string | The default language that has been configured. Defaults to english if not configured. |
public getLanguage ( ) : string | ||
return | string | The language selected by the user according to the processing rules specified, or the default language in any other case. |
public getLanguageCodeAlias ( $langcode ) : string | ||
return | string | The alias, or null if alias not found |
public static getLanguageCookie ( ) : string | null | ||
return | string | null | The selected language or null if unset. |
public getLanguageList ( ) : array | ||
return | array | An array holding all the languages available as the keys of the array. The value for each key is true in case that the language specified by that key is currently active, or false otherwise. |
public getLanguageLocalizedName ( string $code ) : string | ||
$code | string | The ISO 639-2 code of the language. |
return | string | The localized name of the language. |
public getLanguageParameterName ( ) : string | ||
return | string | The language parameter name. |
public getPosixLanguage ( $language ) | ||
$language | Language code for the language to rename, if neccesary. |
public isLanguageRTL ( ) : boolean | ||
return | boolean | True if the language is right-to-left, false otherwise. |
public setLanguage ( string $language, boolean $setLanguageCookie = true ) | ||
$language | string | Language code for the language to set. |
$setLanguageCookie | boolean | Whether to set the language cookie or not. Defaults to true. |
public static setLanguageCookie ( string $language ) | ||
$language | string | The language set by the user. |