/** * Reset the translation object with a new language. * @param $lang_name the new language to use */ public static function reset($lang_name) { self::$lang_name = $lang_name; self::$lang_files = array(); self::$translates = array(); foreach (self::$path_list as $path) { self::loadLang($path); } }
/** * Inclus le fichier de langue qui va bien * l'enregistre dans $translates */ public static function init() { $l = Minz_Configuration::language(); self::$language = Minz_Session::param('language', $l); $l_path = APP_PATH . '/i18n/' . self::$language . '.php'; if (file_exists($l_path)) { self::$translates = (include $l_path); } }