summaryrefslogtreecommitdiffstats
path: root/lib/SimpleSAML/Locale/Language.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/SimpleSAML/Locale/Language.php')
-rw-r--r--lib/SimpleSAML/Locale/Language.php59
1 files changed, 59 insertions, 0 deletions
diff --git a/lib/SimpleSAML/Locale/Language.php b/lib/SimpleSAML/Locale/Language.php
index f843da0..412fc2a 100644
--- a/lib/SimpleSAML/Locale/Language.php
+++ b/lib/SimpleSAML/Locale/Language.php
@@ -69,6 +69,52 @@ class Language
*/
private $customFunction;
+ /**
+ * A list of languages supported with their names localized, indexed by ISO 639-2 code.
+ *
+ * @var array
+ */
+ private $language_names = array(
+ 'no' => 'Bokmål', // Norwegian Bokmål
+ 'nn' => 'Nynorsk', // Norwegian Nynorsk
+ 'se' => 'Sámegiella', // Northern Sami
+ 'sam' => 'Åarjelh-saemien giele', // Southern Sami
+ 'da' => 'Dansk', // Danish
+ 'en' => 'English',
+ 'de' => 'Deutsch', // German
+ 'sv' => 'Svenska', // Swedish
+ 'fi' => 'Suomeksi', // Finnish
+ 'es' => 'Español', // Spanish
+ 'fr' => 'Français', // French
+ 'it' => 'Italiano', // Italian
+ 'nl' => 'Nederlands', // Dutch
+ 'lb' => 'Lëtzebuergesch', // Luxembourgish
+ 'cs' => 'Čeština', // Czech
+ 'sl' => 'Slovenščina', // Slovensk
+ 'lt' => 'Lietuvių kalba', // Lithuanian
+ 'hr' => 'Hrvatski', // Croatian
+ 'hu' => 'Magyar', // Hungarian
+ 'pl' => 'Język polski', // Polish
+ 'pt' => 'Português', // Portuguese
+ 'pt-br' => 'Português brasileiro', // Portuguese
+ 'ru' => 'русский язык', // Russian
+ 'et' => 'eesti keel', // Estonian
+ 'tr' => 'Türkçe', // Turkish
+ 'el' => 'ελληνικά', // Greek
+ 'ja' => '日本語', // Japanese
+ 'zh' => '简体中文', // Chinese (simplified)
+ 'zh-tw' => '繁體中文', // Chinese (traditional)
+ 'ar' => 'العربية', // Arabic
+ 'fa' => 'پارسی', // Persian
+ 'ur' => 'اردو', // Urdu
+ 'he' => 'עִבְרִית', // Hebrew
+ 'id' => 'Bahasa Indonesia', // Indonesian
+ 'sr' => 'Srpski', // Serbian
+ 'lv' => 'Latviešu', // Latvian
+ 'ro' => 'Românește', // Romanian
+ 'eu' => 'Euskara', // Basque
+ );
+
/**
* Constructor
@@ -152,6 +198,19 @@ class Language
/**
+ * Get the localized name of a language, by ISO 639-2 code.
+ *
+ * @param string $code The ISO 639-2 code of the language.
+ *
+ * @return string The localized name of the language.
+ */
+ public function getLanguageLocalizedName($code)
+ {
+ return $this->language_names[$code];
+ }
+
+
+ /**
* Get the language parameter name.
*
* @return string The language parameter name.