* @license PHP License * @package wb * @subpackage Markup */ WBClass::load('WBMarkup_Handler_I18nExtractor'); /** * Markup Handler: I18nExtractor_XmlConfig * * * * @version 0.2.1 * @package wb * @subpackage Markup */ class WBMarkup_Handler_I18nExtractor_XmlConfig extends WBMarkup_Handler_I18nExtractor { /** * extract translatable strings from node * * Do the magic thing * * @param array $node */ protected function extract($node) { // translation not required if (!isset($node['attributes']['nls:translate'])) { return; } $v = intval($node['attributes']['nls:translate']); if (empty($v)) { return; } // nothing to translate if (empty($node['cData'])) { return; } $cData = implode($node['cData']); // remove CDATA marker if(strstr($cData, ''), '', $cData); } $domain = null; if (isset($node['attributes']['nls:domain'])) { $domain = $node['attributes']['nls:domain']; } $this->imp->addMsg($cData, null, $domain); } } ?>