From 153121b95d65f3ffbc87c533b76de5cab94aa41b Mon Sep 17 00:00:00 2001 From: altairis Date: Thu, 3 Oct 2019 15:48:24 +0200 Subject: [PATCH] add MAIN_LANGUAGES_ALLOWED constant --- htdocs/core/class/translate.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 8f9dc32901d..dd5f1e6769d 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -781,6 +781,8 @@ class Translate if (preg_match('/^[a-z]+_[A-Z]+/i', $dir)) { $this->load("languages"); + + if (! empty($conf->global->MAIN_LANGUAGES_ALLOWED) && ! in_array($dir, explode(',' , $conf->global->MAIN_LANGUAGES_ALLOWED)) ) continue; if ($usecode == 2) {