コード例 #1
0
ファイル: block.t.php プロジェクト: richjoslin/rivety
function smarty_block_t($params, $content, $smarty, $repeat) {
	$tpl_vars = $smarty->_tpl_vars;
    // only output on the closing tag
    if (!$repeat) {
        if (isset($content)) {
			$do_translation = true;
			if ($smarty->_tpl_vars['isAdminController'] && RivetyCore_Registry::get('enable_admin_localization') == '0') {
				$do_translation = false;
			}
			if ($params['replace']) {
				return RivetyCore_Translate::translate($tpl_vars['locale_code'], "default", $content, $params['replace'], $do_translation);
			} else {
				return RivetyCore_Translate::translate($tpl_vars['locale_code'], "default", $content, null, $do_translation);
			}
		}
	}
}
コード例 #2
0
	protected function _T($key, $replace = null)
	{
		// we're not actually doing the translation in the installer. we may some day.
		return RivetyCore_Translate::translate(null, "default", $key, $replace, false);
	}
コード例 #3
0
ファイル: Abstract.php プロジェクト: richjoslin/rivety
	protected function _T($key, $replace = null)
	{
		return RivetyCore_Translate::translate($this->locale_code, 'default', $key, $replace);
	}