summaryrefslogtreecommitdiff
path: root/includes/helper
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-01-02 02:21:30 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2017-01-02 02:21:53 +0100
commit84f6990db2a4e388e775a9c1465219eb0f6ed164 (patch)
tree6c430d2cfaa7d6578cb603d1e80fcd3d4399823b /includes/helper
parent94b52504145ed5c889093421167306aa7a45d385 (diff)
parent4a95dfa171dfc6c0b65f36a0417f687bfd40bc97 (diff)
Merged branch origin/master
Diffstat (limited to 'includes/helper')
-rw-r--r--includes/helper/internationalization_helper.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/helper/internationalization_helper.php b/includes/helper/internationalization_helper.php
index 7127bdee..a537ef3d 100644
--- a/includes/helper/internationalization_helper.php
+++ b/includes/helper/internationalization_helper.php
@@ -25,15 +25,15 @@ function locale_short() {
*/
function gettext_init() {
global $locales, $default_locale;
-
- if (isset($_REQUEST['set_locale']) && in_array($_REQUEST['set_locale'], array_keys($locales))) {
+
+ if (isset($_REQUEST['set_locale']) && isset($locales[$_REQUEST['set_locale']])) {
$_SESSION['locale'] = $_REQUEST['set_locale'];
} elseif (! isset($_SESSION['locale'])) {
$_SESSION['locale'] = $default_locale;
}
-
+
gettext_locale();
- bindtextdomain('default', __DIR__ . '../../locale');
+ bindtextdomain('default', realpath(__DIR__ . '/../../locale'));
bind_textdomain_codeset('default', 'UTF-8');
textdomain('default');
}