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();