aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/poche/Poche.class.php
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas.loeuillet@gmail.com>2014-02-21 15:24:33 +0100
committerNicolas Lœuillet <nicolas.loeuillet@gmail.com>2014-02-21 15:24:33 +0100
commitc9bd17a1007bb78e5de0775efca01df0fb515031 (patch)
tree4c257da4f263f8910045481f4facf8b2687747b8 /inc/poche/Poche.class.php
parent0a022f9a39c5b606e47bd8e146ea3662e714273a (diff)
downloadwallabag-c9bd17a1007bb78e5de0775efca01df0fb515031.tar.gz
wallabag-c9bd17a1007bb78e5de0775efca01df0fb515031.tar.zst
wallabag-c9bd17a1007bb78e5de0775efca01df0fb515031.zip
[add] languages well displayed on config page #480
Diffstat (limited to 'inc/poche/Poche.class.php')
-rwxr-xr-xinc/poche/Poche.class.php17
1 files changed, 15 insertions, 2 deletions
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
23 private $currentLanguage = ''; 23 private $currentLanguage = '';
24 private $notInstalledMessage = array(); 24 private $notInstalledMessage = array();
25 25
26 private $language_names = array(
27 'cs_CZ.utf8' => 'čeština',
28 'de_DE.utf8' => 'German',
29 'en_EN.utf8' => 'English',
30 'es_ES.utf8' => 'Español',
31 'fa_IR.utf8' => 'فارسی',
32 'fr_FR.utf8' => 'Français',
33 'it_IT.utf8' => 'Italiano',
34 'pl_PL.utf8' => 'Polski',
35 'ru_RU.utf8' => 'Pусский',
36 'sl_SI.utf8' => 'Slovenščina',
37 'uk_UA.utf8' => 'Український',
38 );
26 public function __construct() 39 public function __construct()
27 { 40 {
28 if ($this->configFileIsAvailable()) { 41 if ($this->configFileIsAvailable()) {
@@ -333,7 +346,7 @@ class Poche
333 $current = true; 346 $current = true;
334 } 347 }
335 348
336 $languages[] = array('name' => $language, 'current' => $current); 349 $languages[] = array('name' => $this->language_names[$language], 'value' => $language, 'current' => $current);
337 } 350 }
338 351
339 return $languages; 352 return $languages;
@@ -751,7 +764,7 @@ class Poche
751 $actualLanguage = false; 764 $actualLanguage = false;
752 765
753 foreach ($languages as $language) { 766 foreach ($languages as $language) {
754 if ($language['name'] == $_POST['language']) { 767 if ($language['value'] == $_POST['language']) {
755 $actualLanguage = true; 768 $actualLanguage = true;
756 break; 769 break;
757 } 770 }