summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-01-02 00:10:49 +0100
committerGitHub <noreply@github.com>2017-01-02 00:10:49 +0100
commit4a95dfa171dfc6c0b65f36a0417f687bfd40bc97 (patch)
treed308338d1cf79680755fd2c3e23a7455890657d0
parent29128763fd7f4b1f300fbc7014b9e6608c5d21a4 (diff)
parent1f0ca24f5ce6c46c2901eb1478b8ab9258ff1700 (diff)
Merge pull request #307 from MyIgel/real-path
Fix relative paths: missing / on internationalization
-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');
}