From c9bd17a1007bb78e5de0775efca01df0fb515031 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 21 Feb 2014 15:24:33 +0100 Subject: [add] languages well displayed on config page #480 --- inc/poche/Poche.class.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 33dddf1e..e852c7e9 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -23,6 +23,19 @@ class Poche private $currentLanguage = ''; private $notInstalledMessage = array(); + private $language_names = array( + 'cs_CZ.utf8' => 'čeština', + 'de_DE.utf8' => 'German', + 'en_EN.utf8' => 'English', + 'es_ES.utf8' => 'Español', + 'fa_IR.utf8' => 'فارسی', + 'fr_FR.utf8' => 'Français', + 'it_IT.utf8' => 'Italiano', + 'pl_PL.utf8' => 'Polski', + 'ru_RU.utf8' => 'Pусский', + 'sl_SI.utf8' => 'Slovenščina', + 'uk_UA.utf8' => 'Український', + ); public function __construct() { if ($this->configFileIsAvailable()) { @@ -333,7 +346,7 @@ class Poche $current = true; } - $languages[] = array('name' => $language, 'current' => $current); + $languages[] = array('name' => $this->language_names[$language], 'value' => $language, 'current' => $current); } return $languages; @@ -751,7 +764,7 @@ class Poche $actualLanguage = false; foreach ($languages as $language) { - if ($language['name'] == $_POST['language']) { + if ($language['value'] == $_POST['language']) { $actualLanguage = true; break; } -- cgit v1.2.3