Esempio n. 1
0
 /**
  * @see TranslatorInterface
  */
 public function register()
 {
     $previous = self::$current;
     self::$current = $this;
     include_once __DIR__ . '/translator_functions.php';
     return $previous;
 }
Esempio n. 2
0
 /**
  * Set a translation instance as global, to use it with the gettext functions
  *
  * @param Translator $translator
  */
 public static function initGettextFunctions(TranslatorInterface $translator)
 {
     self::$current = $translator;
     include_once __DIR__ . '/translator_functions.php';
 }