From e3b3210db15436c97bf3eaef2b45564169d9922a Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 9 Jan 2024 11:23:26 +0100 Subject: [PATCH] GettextTranslator: Also set the default locale for the intl extension --- src/GettextTranslator.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/GettextTranslator.php b/src/GettextTranslator.php index 288a489..ee0cee4 100644 --- a/src/GettextTranslator.php +++ b/src/GettextTranslator.php @@ -2,6 +2,7 @@ namespace ipl\I18n; +use Locale; use FilesystemIterator; use ipl\Stdlib\Contract\Translator; use SplFileInfo; @@ -195,6 +196,7 @@ public function setLocale($locale) { putenv("LANGUAGE=$locale.UTF-8"); setlocale(LC_ALL, $locale . '.UTF-8'); + Locale::setDefault($locale . '.UTF-8'); $this->loadTranslations();