public function executeMyTest() { echo "Teste de sem layout"; I18nXml::create('pt_BR'); I18nXml::create('en_US'); I18nXml::read('pt_BR'); return ViewActions::VIEW_NONE; }
/** * Performs the translation * @param String $tag * @param String $culture * @return String */ public static function translate($tag, $culture = null) { $objCulture = new Culture(); $culture = $objCulture->checkCulture($culture); $arrayXml = I18nXml::read($culture); $count = count($arrayXml); for ($i = 0; $i < $count; $i++) { if ($arrayXml[$i]->tag == $tag) { return $arrayXml[$i]->i18n; } } return $tag; }