Ejemplo n.º 1
0
 /**
  * Return translations according to definition in help.ini.
  */
 public function getTranslation()
 {
     // load translations in order specified in help.ini
     $helpConfig = new Zend_Config_Ini(APPLICATION_PATH . '/application/configs/help/help.ini');
     $helpConfigArray = $helpConfig->toArray();
     $tmxData = parent::getTranslation();
     $filteredTmxData = array();
     foreach ($helpConfigArray as $helpKey => $helpContents) {
         if (isset($tmxData[$helpKey])) {
             $filteredTmxData[$helpKey] = $tmxData[$helpKey];
         }
         foreach ($helpContents as $value) {
             if (isset($tmxData["help_title_{$value}"])) {
                 $filteredTmxData["help_title_{$value}"] = $tmxData["help_title_{$value}"];
             }
             if (isset($tmxData["help_content_{$value}"])) {
                 $filteredTmxData["help_content_{$value}"] = $tmxData["help_content_{$value}"];
             }
         }
     }
     return $filteredTmxData;
 }