Selaa lähdekoodia

added locale handling forward compatibility

Lukas Kahwe Smith 13 vuotta sitten
vanhempi
commit
c1426baee1
1 muutettua tiedostoa jossa 15 lisäystä ja 0 poistoa
  1. 15 0
      src/Symfony/Component/HttpFoundation/Request.php

+ 15 - 0
src/Symfony/Component/HttpFoundation/Request.php

@@ -845,6 +845,21 @@ class Request
         $this->format = $format;
     }
 
+    public function setDefaultLocale($locale)
+    {
+        $this->session->setPhpDefaultLocale($locale);
+    }
+
+    public function setLocale($locale)
+    {
+        $this->session->setLocale($locale);
+    }
+
+    public function getLocale()
+    {
+        return $this->session->getLocale();
+    }
+
     /**
      * Checks whether the method is safe or not.
      *