/** * @see TranslatorInterface */ public function register() { $previous = self::$current; self::$current = $this; include_once __DIR__ . '/translator_functions.php'; return $previous; }
/** * 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'; }