소스 검색

added some missing methods

Fabien Potencier 14 년 전
부모
커밋
1d1a437edc
2개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      src/Symfony/Component/Translation/Translator.php
  2. 7 0
      src/Symfony/Component/Translation/TranslatorInterface.php

+ 8 - 0
src/Symfony/Component/Translation/Translator.php

@@ -78,6 +78,14 @@ class Translator implements TranslatorInterface
         $this->locale = $locale;
     }
 
+    /**
+     * {@inheritdoc}
+     */
+    public function getLocale()
+    {
+        return $this->locale;
+    }
+
     /**
      * Sets the fallback locale.
      *

+ 7 - 0
src/Symfony/Component/Translation/TranslatorInterface.php

@@ -49,4 +49,11 @@ interface TranslatorInterface
      * @param string $locale The locale
      */
     function setLocale($locale);
+
+    /**
+     * Returns the current locale.
+     *
+     * @return stringThe locale
+     */
+    function getLocale();
 }