diff options
-rwxr-xr-x | inc/poche/Poche.class.php | 17 | ||||
-rw-r--r-- | themes/baggy/config.twig | 2 | ||||
-rw-r--r-- | themes/default/config.twig | 2 |
3 files changed, 17 insertions, 4 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 | } |
diff --git a/themes/baggy/config.twig b/themes/baggy/config.twig index cbb42f65..b37ac115 100644 --- a/themes/baggy/config.twig +++ b/themes/baggy/config.twig | |||
@@ -69,7 +69,7 @@ | |||
69 | <label class="col w150p" for="language">{% trans "Language:" %}</label> | 69 | <label class="col w150p" for="language">{% trans "Language:" %}</label> |
70 | <select class="col" id="language" name="language"> | 70 | <select class="col" id="language" name="language"> |
71 | {% for language in languages %} | 71 | {% for language in languages %} |
72 | <option value="{{ language.name }}" {{ language.current ? 'selected' : '' }}>{{ language.name }}</option> | 72 | <option value="{{ language.value }}" {{ language.current ? 'selected' : '' }}>{{ language.name }}</option> |
73 | {% endfor %} | 73 | {% endfor %} |
74 | </select> | 74 | </select> |
75 | </div> | 75 | </div> |
diff --git a/themes/default/config.twig b/themes/default/config.twig index c513f239..cd4d074d 100644 --- a/themes/default/config.twig +++ b/themes/default/config.twig | |||
@@ -69,7 +69,7 @@ | |||
69 | <label class="col w150p" for="language">{% trans "Language:" %}</label> | 69 | <label class="col w150p" for="language">{% trans "Language:" %}</label> |
70 | <select class="col" id="language" name="language"> | 70 | <select class="col" id="language" name="language"> |
71 | {% for language in languages %} | 71 | {% for language in languages %} |
72 | <option value="{{ language.name }}" {{ language.current ? 'selected' : '' }}>{{ language.name }}</option> | 72 | <option value="{{ language.value }}" {{ language.current ? 'selected' : '' }}>{{ language.name }}</option> |
73 | {% endfor %} | 73 | {% endfor %} |
74 | </select> | 74 | </select> |
75 | </div> | 75 | </div> |