84        'sma'   => 
'Åarjelh-saemien giele', 
 
   94        'lb'    => 
'Lëtzebuergesch', 
 
   96        'sl'    => 
'Slovenščina', 
 
   97        'lt'    => 
'Lietuvių kalba', 
 
  100        'pl'    => 
'Język polski', 
 
  102        'pt-br' => 
'Português brasileiro', 
 
  103        'ru'    => 
'русский язык', 
 
  104        'et'    => 
'eesti keel', 
 
  114        'id'    => 
'Bahasa Indonesia', 
 
  142        $this->defaultLanguage = $this->configuration->getString(
'language.default', 
'en');
 
  143        $this->languageParameterName = $this->configuration->getString(
'language.parameter.name', 
'language');
 
  144        $this->customFunction = $this->configuration->getArray(
'language.get_language_function', 
null);
 
  145        $this->rtlLanguages = $this->configuration->getArray(
'language.rtl', array());
 
  146        if (isset(
$_GET[$this->languageParameterName])) {
 
  148                $_GET[$this->languageParameterName],
 
  149                $this->configuration->getBoolean(
'language.parameter.setcookie', 
true)
 
  162        $configuredAvailableLanguages = $this->configuration->getArray(
'language.available', array(
'en'));
 
  164        foreach ($configuredAvailableLanguages as 
$code) {
 
  165            if (array_key_exists(
$code, $this->language_names) && isset($this->language_names[
$code])) {
 
  184        if (isset($this->languagePosixMapping[
$language])) {
 
  185            return $this->languagePosixMapping[
$language];
 
  200        if (in_array(
$language, $this->availableLanguages, 
true)) {
 
  202            if ($setLanguageCookie === 
true) {
 
  220        if (isset($this->language)) {
 
  225        if (isset($this->customFunction) && is_callable($this->customFunction)) {
 
  226            $customLanguage = call_user_func($this->customFunction, $this);
 
  227            if ($customLanguage !== 
null && $customLanguage !== 
false) {
 
  228                return $customLanguage;
 
  234        if ($languageCookie !== 
null) {
 
  235            $this->language = $languageCookie;
 
  236            return $languageCookie;
 
  241        if ($httpLanguage !== 
null) {
 
  242            return $httpLanguage;
 
  259        if (array_key_exists(
$code, $this->language_names) && isset($this->language_names[
$code])) {
 
  260            return $this->language_names[
$code];
 
  292        $bestLanguage = 
null;
 
  295        foreach ($languageScore as 
$language => $score) {
 
  297            if (array_key_exists(
$language, $languageMap)) {
 
  301            if (!in_array(
$language, $this->availableLanguages, 
true)) {
 
  310            if ($score > $bestScore) {
 
  316        return $bestLanguage;
 
  338        if (isset(self::$defaultLanguageMap[$langcode])) {
 
  339            return self::$defaultLanguageMap[$langcode];
 
  355        $list = array_fill_keys($this->availableLanguages, 
false);
 
  368        return in_array($this->
getLanguage(), $this->rtlLanguages, 
true);
 
  381        $name = 
$config->getString(
'language.cookie.name', 
'language');
 
  402        assert(
'is_string($language)');
 
  412        $name = 
$config->getString(
'language.cookie.name', 
'language');
 
  414            'lifetime' => (
$config->getInteger(
'language.cookie.lifetime', 60 * 60 * 24 * 900)),
 
  415            'domain'   => (
$config->getString(
'language.cookie.domain', 
null)),
 
  416            'path'     => (
$config->getString(
'language.cookie.path', 
'/')),
 
  417            'secure'   => (
$config->getBoolean(
'language.cookie.secure', 
false)),
 
  418            'httponly' => (
$config->getBoolean(
'language.cookie.httponly', 
false)),
 
An exception for terminatinating execution or to throw for unit testing.
static getLanguageCookie()
Retrieve the user-selected language from a cookie.
static setLanguageCookie($language)
This method will attempt to set the user-selected language in a cookie.
getLanguageCodeAlias($langcode)
Return an alias for a language code, if any.
getLanguageList()
Return an indexed list of all languages available.
isLanguageRTL()
Check whether a language is written from the right to the left or not.
getDefaultLanguage()
Return the default language according to configuration.
getInstalledLanguages()
Filter configured (available) languages against installed languages.
getLanguage()
This method will return the language selected by the user, or the default language.
getPosixLanguage($language)
Rename to non-idiosyncratic language code.
__construct(\SimpleSAML_Configuration $configuration)
Constructor.
getLanguageLocalizedName($code)
Get the localized name of a language, by ISO 639-2 code.
getLanguageParameterName()
Get the language parameter name.
getHTTPLanguage()
This method returns the preferred language for the user based on the Accept-Language HTTP header.
static $defaultLanguageMap
This is the default language map.
setLanguage($language, $setLanguageCookie=true)
This method will set a cookie for the user's browser to remember what language was selected.
static setCookie($name, $value, $params=null, $throw=true)
Set a cookie.
static getAcceptLanguage()
This function parses the Accept-Language HTTP header and returns an associative array with each langu...
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
if(isset($_REQUEST['delete'])) $list