Ejemplo n.º 1
0
 public static function clearTranslations()
 {
     self::$dictionary = array();
 }
Ejemplo n.º 2
0
 /**
  * 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';
 }
Ejemplo n.º 3
0
 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();
 }