소스 검색

added locale handling forward compatibility

Lukas Kahwe Smith 13 년 전
부모
커밋
c1426baee1
1개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  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.
      *