From 9ec28447ea0c11c195764dff82ed0c984290d477 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Philipp=20Sch=C3=BCttl=C3=B6ffel?=
 <schuettloeffel@zqs.uni-hannover.de>
Date: Mon, 3 Jul 2023 12:11:14 +0000
Subject: [PATCH] Resolve "Lokalisation klappt auf Mac OS nicht"

Closes #2809

Merge request studip/studip!1891
---
 lib/language.inc.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/language.inc.php b/lib/language.inc.php
index 392629048bb..a56fbe97f0b 100644
--- a/lib/language.inc.php
+++ b/lib/language.inc.php
@@ -209,6 +209,7 @@ function restoreLanguage() {
 */
 function setLocaleEnv($language, $language_domain = ''){
     putenv('LANGUAGE'); //unset language preference
+    putenv('LC_ALL=' . $language . '.UTF-8'); //needed in MacOS since gettext doesnt read setlocale()
     $ret = setlocale(LC_ALL, $language . '.UTF-8');
     setlocale(LC_NUMERIC, 'C');
     if ($language_domain) {
-- 
GitLab