function _translateMetadata($metadata, $phrase_id, $mode)
 {
     if (isset($metadata['domain'])) {
         return $this->i18n->gettext($metadata['domain'], $phrase_id, $mode);
     }
     if (isset($metadata['type'])) {
         return $this->_translateByType($metadata['type'], $phrase_id);
     }
     return null;
 }
Exemple #2
0
 function translate($params, $phrase_id, &$smarty, $repeat)
 {
     if ($repeat) {
         return null;
         // see Smarty manual
     }
     $this->i18n = SJB_I18N::getInstance();
     $mode = isset($params['mode']) ? $params['mode'] : null;
     $phrase_id = trim($phrase_id);
     $res = $this->i18n->gettext('', $phrase_id, $mode);
     return $this->replace_with_template_vars($res, $smarty);
 }