From 9834bfc4dc7f0bbf4020cebb43b03069592bc687 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Mon, 21 Sep 2020 21:20:42 +0200 Subject: Return translation array from include Much better the the implied variable that gets set by the include! --- ratatoeskr/sys/translation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ratatoeskr/sys/translation.php') diff --git a/ratatoeskr/sys/translation.php b/ratatoeskr/sys/translation.php index 30f32e3..5a763ce 100644 --- a/ratatoeskr/sys/translation.php +++ b/ratatoeskr/sys/translation.php @@ -58,7 +58,7 @@ function load_language($lang=null) */ $lang = implode("", array_filter(str_split($lang, 1), "ctype_alpha")); - require(dirname(__FILE__) . "/../translations/$lang.php"); + $translation = require(dirname(__FILE__) . "/../translations/$lang.php"); $GLOBALS["translation"] = $translation; } -- cgit v1.2.3-70-g09d2