Pārlūkot izejas kodu

added some missing methods

Fabien Potencier 14 gadi atpakaļ
vecāks
revīzija
1d1a437edc

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