public static function clearTranslations() { self::$dictionary = array(); }
/** * Set a translation instance as global, to use it with the gettext functions * * @param Translator $translator */ public static function initGettextFunctions(Translator $translator) { self::$current = $translator; include_once __DIR__ . '/translator_functions.php'; }
private static function loadNative($locale) { $translator = new GettextTranslator(); $translator->setLanguage($locale); $translator->loadDomain(self::$config['domain'], self::$config['storage']); bind_textdomain_codeset(self::$config['domain'], 'UTF-8'); $translator->register(); }