*/ /** * patTemplate gettext wrapper * * $Id$ * * @package patTemplate * @subpackage Functions * @author gERD Schaufelberger */ class patTemplate_Function_Gettext extends patTemplate_Function { /** * name of the function * @access private * @var string */ var $_name = 'Gettext'; /** * call the function * * @access public * @param array parameters of the function (= attributes of the tag) * @param string content of the tag * @return string content to insert into the template */ function call( $params, $content ) { // nothing to do if( empty( $content ) ) { return ''; } // translate with domain if( isset( $params['domain'] ) ) { return dcgettext( $params['domain'], $content ); } // use default domain return gettext( $content ); } } ?>