ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct (\SimpleSAML_Configuration $configuration) | |
Constructor. More... | |
getPosixLanguage ($language) | |
Rename to non-idiosyncratic language code. More... | |
setLanguage ($language, $setLanguageCookie=true) | |
This method will set a cookie for the user's browser to remember what language was selected. More... | |
getLanguage () | |
This method will return the language selected by the user, or the default language. More... | |
getLanguageLocalizedName ($code) | |
Get the localized name of a language, by ISO 639-2 code. More... | |
getLanguageParameterName () | |
Get the language parameter name. More... | |
getDefaultLanguage () | |
Return the default language according to configuration. More... | |
getLanguageCodeAlias ($langcode) | |
Return an alias for a language code, if any. More... | |
getLanguageList () | |
Return an indexed list of all languages available. More... | |
isLanguageRTL () | |
Check whether a language is written from the right to the left or not. More... | |
Static Public Member Functions | |
static | getLanguageCookie () |
Retrieve the user-selected language from a cookie. More... | |
static | setLanguageCookie ($language) |
This method will attempt to set the user-selected language in a cookie. More... | |
Private Member Functions | |
getInstalledLanguages () | |
Filter configured (available) languages against installed languages. More... | |
getHTTPLanguage () | |
This method returns the preferred language for the user based on the Accept-Language HTTP header. More... | |
Private Attributes | |
$configuration | |
$availableLanguages | |
$language = null | |
$defaultLanguage | |
$rtlLanguages | |
$languageParameterName | |
$customFunction | |
$language_names | |
$languagePosixMapping | |
Static Private Attributes | |
static | $defaultLanguageMap = array('nb' => 'no') |
This is the default language map. More... | |
Definition at line 15 of file Language.php.
SimpleSAML\Locale\Language::__construct | ( | \SimpleSAML_Configuration | $configuration | ) |
Constructor.
\SimpleSAML_Configuration | $configuration | Configuration object |
Definition at line 139 of file Language.php.
References $_GET, SimpleSAML\Locale\Language\$configuration, SimpleSAML\Locale\Language\getInstalledLanguages(), and SimpleSAML\Locale\Language\setLanguage().
SimpleSAML\Locale\Language::getDefaultLanguage | ( | ) |
Return the default language according to configuration.
Definition at line 326 of file Language.php.
References SimpleSAML\Locale\Language\$defaultLanguage.
Referenced by SimpleSAML\Locale\Language\getLanguage().
|
private |
This method returns the preferred language for the user based on the Accept-Language HTTP header.
Definition at line 285 of file Language.php.
References SimpleSAML\Locale\Language\$language, and SimpleSAML\Utils\HTTP\getAcceptLanguage().
Referenced by SimpleSAML\Locale\Language\getLanguage().
|
private |
Filter configured (available) languages against installed languages.
Definition at line 161 of file Language.php.
References SimpleSAML\Locale\Language\$availableLanguages, $code, and SimpleSAML\Logger\error().
Referenced by SimpleSAML\Locale\Language\__construct().
SimpleSAML\Locale\Language::getLanguage | ( | ) |
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.
Definition at line 218 of file Language.php.
References SimpleSAML\Locale\Language\$language, SimpleSAML\Locale\Language\getDefaultLanguage(), SimpleSAML\Locale\Language\getHTTPLanguage(), and SimpleSAML\Locale\Language\getLanguageCookie().
Referenced by SimpleSAML\Locale\Language\getLanguageList(), and SimpleSAML\Locale\Language\isLanguageRTL().
SimpleSAML\Locale\Language::getLanguageCodeAlias | ( | $langcode | ) |
Return an alias for a language code, if any.
Definition at line 337 of file Language.php.
|
static |
Retrieve the user-selected language from a cookie.
Definition at line 378 of file Language.php.
References $_COOKIE, SimpleSAML\Locale\Language\$availableLanguages, $config, SimpleSAML\Locale\Language\$language, $name, and SimpleSAML_Configuration\getInstance().
Referenced by SimpleSAML\Locale\Language\getLanguage(), and sspmod_core_Auth_Process_LanguageAdaptor\process().
SimpleSAML\Locale\Language::getLanguageList | ( | ) |
Return an indexed list of all languages available.
Definition at line 353 of file Language.php.
References $current, $list, and SimpleSAML\Locale\Language\getLanguage().
SimpleSAML\Locale\Language::getLanguageLocalizedName | ( | $code | ) |
Get the localized name of a language, by ISO 639-2 code.
string | $code | The ISO 639-2 code of the language. |
Definition at line 258 of file Language.php.
References $code, and SimpleSAML\Logger\error().
SimpleSAML\Locale\Language::getLanguageParameterName | ( | ) |
Get the language parameter name.
Definition at line 273 of file Language.php.
References SimpleSAML\Locale\Language\$languageParameterName.
SimpleSAML\Locale\Language::getPosixLanguage | ( | $language | ) |
Rename to non-idiosyncratic language code.
string | $language | Language code for the language to rename, if necessary. |
Definition at line 183 of file Language.php.
References SimpleSAML\Locale\Language\$language.
SimpleSAML\Locale\Language::isLanguageRTL | ( | ) |
Check whether a language is written from the right to the left or not.
Definition at line 367 of file Language.php.
References SimpleSAML\Locale\Language\getLanguage().
SimpleSAML\Locale\Language::setLanguage | ( | $language, | |
$setLanguageCookie = true |
|||
) |
This method will set a cookie for the user's browser to remember what language was selected.
string | $language | Language code for the language to set. |
boolean | $setLanguageCookie | Whether to set the language cookie or not. Defaults to true. |
Definition at line 198 of file Language.php.
References SimpleSAML\Locale\Language\$language.
Referenced by SimpleSAML\Locale\Language\__construct().
|
static |
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.
string | $language | The language set by the user. |
Definition at line 401 of file Language.php.
References SimpleSAML\Locale\Language\$availableLanguages, $config, SimpleSAML\Locale\Language\$language, $name, PHPMailer\PHPMailer\$params, SimpleSAML_Configuration\getInstance(), and SimpleSAML\Utils\HTTP\setCookie().
Referenced by sspmod_core_Auth_Process_LanguageAdaptor\process().
|
private |
Definition at line 35 of file Language.php.
Referenced by SimpleSAML\Locale\Language\getInstalledLanguages(), SimpleSAML\Locale\Language\getLanguageCookie(), and SimpleSAML\Locale\Language\setLanguageCookie().
|
private |
Definition at line 28 of file Language.php.
Referenced by SimpleSAML\Locale\Language\__construct().
|
private |
Definition at line 70 of file Language.php.
|
private |
Definition at line 49 of file Language.php.
Referenced by SimpleSAML\Locale\Language\getDefaultLanguage().
|
staticprivate |
This is the default language map.
It is used to map languages codes from the user agent to other language codes.
Definition at line 21 of file Language.php.
|
private |
Definition at line 42 of file Language.php.
Referenced by SimpleSAML\Locale\Language\getHTTPLanguage(), SimpleSAML\Locale\Language\getLanguage(), SimpleSAML\Locale\Language\getLanguageCookie(), SimpleSAML\Locale\Language\getPosixLanguage(), SimpleSAML\Locale\Language\setLanguage(), and SimpleSAML\Locale\Language\setLanguageCookie().
|
private |
Definition at line 80 of file Language.php.
|
private |
Definition at line 63 of file Language.php.
Referenced by SimpleSAML\Locale\Language\getLanguageParameterName().
|
private |
Definition at line 128 of file Language.php.
|
private |
Definition at line 56 of file Language.php.