From 1f0ca24f5ce6c46c2901eb1478b8ab9258ff1700 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sun, 1 Jan 2017 19:49:59 +0100 Subject: Fix relative paths: missing / on internationalization --- includes/helper/internationalization_helper.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'includes/helper') 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'); } -- cgit v1.2.3-54-g00ecf