From 2bfc3d1a0c5eba668b1144bb4a9ab7351aa46b60 Mon Sep 17 00:00:00 2001 From: Jeroen De meerleer Date: Sat, 29 Dec 2018 21:35:35 +0100 Subject: [PATCH] begone --- src/Core/L10n.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Core/L10n.php b/src/Core/L10n.php index 2fcf6bf44a..dfeeeb041b 100644 --- a/src/Core/L10n.php +++ b/src/Core/L10n.php @@ -74,7 +74,7 @@ class L10n extends BaseObject } } } - //if $_GET['lang'] is set force $_GET['lang'] + if (isset($_GET['lang'])) { $_SESSION['language'] = $_GET['lang']; } @@ -113,10 +113,11 @@ class L10n extends BaseObject } } } - //if $_GET['lang'] is set force $_GET['lang'] + if (isset($_GET['lang'])) { $lang_list = [$_GET['lang']]; } + // check if we have translations for the preferred languages and pick the 1st that has foreach ($lang_list as $lang) { if ($lang === 'en' || (file_exists("view/lang/$lang") && is_dir("view/lang/$lang"))) { -- 2.39.5