]> git.agnieray.net Git - galette.git/blobdiff - galette/lib/Galette/Core/I18n.php
Locale was not updated on translator
[galette.git] / galette / lib / Galette / Core / I18n.php
index 8264aa55c7a4ec41cd5c4490e63f48869522ddae..cc0626eb368e80ef128f334c8dea1371b0b431ae 100644 (file)
@@ -125,6 +125,8 @@ class I18n
      */
     public function updateEnv()
     {
+        global $translator;
+
         setlocale(LC_ALL, $this->getLongID());
 
         if (
@@ -140,6 +142,9 @@ class I18n
             textdomain($domain);
             bind_textdomain_codeset($domain, 'UTF-8');
         }
+        if ($translator) {
+            $translator->setLocale($this->getLongID());
+        }
     }
 
     /**