本文整理汇总了PHP中smarty_function_translate函数的典型用法代码示例。如果您正苦于以下问题:PHP smarty_function_translate函数的具体用法?PHP smarty_function_translate怎么用?PHP smarty_function_translate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了smarty_function_translate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: smarty_fun_headLink
function smarty_fun_headLink(&$smarty, $params)
{
$_fun_tpl_vars = $smarty->_tpl_vars;
$smarty->assign($params);
?>
<?php
if ($smarty->_tpl_vars['title']) {
?>
<?php
$smarty->assign('sortOrder', is_array($_tmp = array_pop(explode('_', $smarty->_tpl_vars['sortField']))) ? $smarty->_run_mod_handler('default', true, $_tmp, 'asc') : smarty_modifier_default($_tmp, 'asc'));
?>
<?php
if ($smarty->_tpl_vars['sortOrder'] != 'asc' && $smarty->_tpl_vars['sortOrder'] != 'desc') {
$smarty->assign('sortOrder', 'asc');
}
?>
<?php
if ($smarty->_tpl_vars['sortField'] == $smarty->_tpl_vars['sortVar'] . "_" . $smarty->_tpl_vars['sortOrder']) {
?>
<?php
$smarty->assign('currentOrder', $smarty->_tpl_vars['sortOrder']);
?>
<?php
if ($smarty->_tpl_vars['sortOrder'] == 'asc') {
$smarty->assign('sortOrder', 'desc');
} else {
$smarty->assign('sortOrder', 'asc');
}
?>
<?php
}
?>
<a href="<?php
echo smarty_function_link(array('self' => true, 'sort' => $smarty->_tpl_vars['sortVar'] . "_" . $smarty->_tpl_vars['sortOrder']), $smarty);
?>
" class="<?php
if ($smarty->_tpl_vars['currentOrder']) {
?>
direction_<?php
echo $smarty->_tpl_vars['currentOrder'];
}
?>
"><?php
echo smarty_function_translate(array('text' => $smarty->_tpl_vars['title']), $smarty);
?>
</a>
<?php
}
$smarty->_tpl_vars = $_fun_tpl_vars;
}
示例2: ob_start
if ($this->_tpl_vars['isLoginRequiredToRate']) {
?>
<p><?php
ob_start();
echo smarty_function_link(array('controller' => 'user', 'action' => 'login'), $this);
$this->_smarty_vars['capture']['default'] = ob_get_contents();
$this->assign('blockAsParamValue', ob_get_contents());
ob_end_clean();
echo smarty_function_maketext(array('text' => '_msg_rating_login_required', 'params' => $this->_tpl_vars['blockAsParamValue']), $this);
?>
</p>
<?php
} elseif ($this->_tpl_vars['isPurchaseRequiredToRate']) {
?>
<p><?php
echo smarty_function_translate(array('text' => '_msg_rating_purchase_required'), $this);
?>
</p>
<?php
} else {
?>
<?php
$_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "custom:product/rate.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>
<?php
}
?>
</div>
示例3: smarty_core_load_plugins
<?php
/* Smarty version 2.6.26, created on 2015-12-11 14:39:30
compiled from custom:backend/customerOrder/groupContainer.tpl */
require_once SMARTY_CORE_DIR . 'core.load_plugins.php';
smarty_core_load_plugins(array('plugins' => array(array('function', 'translate', 'custom:backend/customerOrder/groupContainer.tpl', 3, false), array('function', 'link', 'custom:backend/customerOrder/groupContainer.tpl', 8, false))), $this);
?>
<div id="orderGroupsManagerContainer" class="treeManagerContainer maxHeight h--20">
<div id="loadingOrder" style="display: none; position: absolute; text-align: center; width: 100%; padding-top: 200px; z-index: 50000;">
<span style="padding: 40px; background-color: white; border: 1px solid black;"><?php
echo smarty_function_translate(array('text' => '_loading_order'), $this);
?>
<span class="progressIndicator"></span></span>
</div>
<div class="tabContainer" id="orderGroupsTabContainer">
<ul class="tabList tabs">
<li id="tabOrders" class="tab inactive">
<a href="<?php
echo smarty_function_link(array('controller' => "backend.customerOrder", 'action' => 'orders'), $this);
?>
?id=_id_"><?php
echo smarty_function_translate(array('text' => '_orders'), $this);
?>
</a>
<span class="tabHelp">orders</span>
</li>
</ul>
</div>
<div class="sectionContainer maxHeight h--50"></div>
</div>
示例4: smarty_function_translate
<input type="submit" name="save" class="submit" value="<?php
echo smarty_function_translate(array('text' => '_save'), $this);
?>
" id="user_<?php
echo $this->_tpl_vars['someUser']['UserGroup']['ID'];
?>
_<?php
echo $this->_tpl_vars['someUser']['ID'];
?>
_submit">
<?php
echo smarty_function_translate(array('text' => '_or'), $this);
?>
<a class="cancel" href="#"><?php
echo smarty_function_translate(array('text' => '_cancel'), $this);
?>
</a>
</fieldset>
<script type="text/javascript">
<?php
echo '
if(';
echo $this->_tpl_vars['someUser']['ID'];
echo ' > 0)
{
Backend.UserGroup.prototype.treeBrowser.selectItem(';
echo is_array($_tmp = @$this->_tpl_vars['someUser']['UserGroup']['ID']) ? $this->_run_mod_handler('default', true, $_tmp, -1) : smarty_modifier_default($_tmp, -1);
echo ', false);
Backend.User.Editor.prototype.getInstance(';
示例5: unset
unset($_smarty_tpl_vars);
?>
</li>
<?php
echo smarty_function_renderBlock(array('block' => "BACKEND-TOOLBAR-BEFORE-LASTVIEWED"), $this);
?>
<li id="lastviewed" class="lastviewed invalid"><a href="#" class="lastviewed"><?php
echo smarty_function_translate(array('text' => '_last_viewed'), $this);
?>
</a>
<div class="subpanel">
<h3><span> – </span><?php
echo smarty_function_translate(array('text' => '_last_viewed'), $this);
?>
</h3>
<div id="lastViewedIndicator" class="progressIndicator" style="display:none;"></div>
<ul>
</ul>
</div>
</li>
<?php
echo smarty_function_renderBlock(array('block' => "BACKEND-TOOLBAR-AFTER-LASTVIEWED"), $this);
?>
</ul>
示例6: unset
<?php
}
?>
<?php
}
}
unset($_from);
?>
</div>
<div class="clear"></div>
<div class="applyTo">
<p>
<label><?php
echo smarty_function_translate(array('text' => '_apply_to'), $this);
?>
</label>
<span><?php
echo smarty_function_selectfield(array('name' => 'type', 'class' => 'applyTo', 'options' => $this->_tpl_vars['applyToChoices']), $this);
?>
</span>
</p>
<div class="conditionContainer actionCondition">
<ul class="conditionContainer root" style="display: none;"></ul>
</div>
</div>
</li>
<?php
$_block_content = ob_get_contents();
示例7: smarty_function_translate
">
<div class="responseUser">
<span class="responderType">
<?php
if ($this->_tpl_vars['note']['isAdmin']) {
?>
<?php
echo smarty_function_translate(array('text' => '_admin'), $this);
?>
:
<?php
} else {
?>
<?php
echo smarty_function_translate(array('text' => '_customer'), $this);
?>
:
<?php
}
?>
</span>
<a href="<?php
echo smarty_function_backendUserUrl(array('user' => $this->_tpl_vars['note']['User']), $this);
?>
"><?php
echo $this->_tpl_vars['note']['User']['fullName'];
?>
</a>
</div>
示例8: smarty_function_activeGrid
';
?>
<?php
echo smarty_function_activeGrid(array('prefix' => 'discount', 'id' => 0, 'role' => "product.mass", 'controller' => "backend.discount", 'action' => 'lists', 'displayedColumns' => $this->_tpl_vars['displayedColumns'], 'availableColumns' => $this->_tpl_vars['availableColumns'], 'totalCount' => $this->_tpl_vars['totalCount'], 'container' => 'discountGrid', 'dataFormatter' => "Backend.Discount.GridFormatter", 'massAction' => "backend/discount/massAction.tpl", 'count' => "backend/discount/gridCount.tpl"), $this);
?>
<?php
echo '
<script type="text/javascript">
var massHandler = new ActiveGrid.MassActionHandler($(\'discountMass\'), window.activeGrids[\'discount_0\']);
massHandler.deleteConfirmMessage = \'';
ob_start();
echo smarty_function_translate(array('text' => '_are_you_sure_you_want_to_delete_rule'), $this);
$this->_smarty_vars['capture']['default'] = ob_get_contents();
$this->assign('translation__are_you_sure_you_want_to_delete_rule', ob_get_contents());
ob_end_clean();
echo is_array($_tmp = $this->_tpl_vars['translation__are_you_sure_you_want_to_delete_rule']) ? $this->_run_mod_handler('addslashes', true, $_tmp) : addslashes($_tmp);
echo '\' ;
massHandler.nothingSelectedMessage = \'';
ob_start();
echo smarty_function_translate(array('text' => '_nothing_selected'), $this);
$this->_smarty_vars['capture']['default'] = ob_get_contents();
$this->assign('translation__nothing_selected', ob_get_contents());
ob_end_clean();
echo is_array($_tmp = $this->_tpl_vars['translation__nothing_selected']) ? $this->_run_mod_handler('addslashes', true, $_tmp) : addslashes($_tmp);
echo '\' ;
</script>
';
示例9: smarty_function_translate
?>
<div class="intervalSelector">
<span><?php
echo smarty_function_translate(array('text' => '_interval'), $this);
?>
:</span>
<select class="intervalSelect">
<option value="day"><?php
echo smarty_function_translate(array('text' => '_daily'), $this);
?>
</option>
<option value="month"><?php
echo smarty_function_translate(array('text' => '_monthly'), $this);
?>
</option>
<option value="year"><?php
echo smarty_function_translate(array('text' => '_yearly'), $this);
?>
</option>
<option value="hour"><?php
echo smarty_function_translate(array('text' => '_hourly'), $this);
?>
</option>
<option value="week"><?php
echo smarty_function_translate(array('text' => '_weekly'), $this);
?>
</option>
</select>
</div>
<?php
}
示例10: smarty_function_translate
echo smarty_function_translate(array('text' => '_form_has_been_successfully_saved'), $this);
echo '\';
Backend.CustomerOrder.Links.selectCustomer = \'';
echo smarty_function_link(array('controller' => "backend.customerOrder", 'action' => 'selectCustomer'), $this);
echo '\';
Backend.CustomerOrder.Editor.prototype.Messages.orderNum = \'';
ob_start();
echo smarty_function_translate(array('text' => '_order_number'), $this);
$this->_smarty_vars['capture']['default'] = ob_get_contents();
$this->assign('translation__order_number', ob_get_contents());
ob_end_clean();
echo is_array($_tmp = $this->_tpl_vars['translation__order_number']) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp);
echo '\';
Backend.CustomerOrder.Messages.selecCustomerTitle = \'';
echo smarty_function_translate(array('text' => '_select_customer_title'), $this);
echo '\';
Backend.CustomerOrder.Links.createOrder = \'';
echo smarty_function_link(array('controller' => "backend.customerOrder", 'action' => 'create'), $this);
echo '\';
Backend.User.Group.prototype.Links.save = \'';
echo smarty_function_link(array('controller' => "backend.userGroup", 'action' => 'save'), $this);
echo '\';
Backend.User.Group.prototype.Links.remove = \'';
echo smarty_function_link(array('controller' => "backend.userGroup", 'action' => 'delete'), $this);
echo '\';
Backend.User.Group.prototype.Links.createNewUserGroup = \'';
echo smarty_function_link(array('controller' => "backend.userGroup", 'action' => 'create'), $this);
echo '\';
Backend.User.Group.prototype.Links.removeNewGroup = \'';
示例11: smarty_function_renderBlock
<?php
if (!$this->_tpl_vars['searchQuery'] && 1 == $this->_tpl_vars['currentPage']) {
?>
<?php
echo smarty_function_renderBlock(array('block' => 'PRODUCT_LISTS'), $this);
?>
<?php
}
?>
<?php
if ($this->_tpl_vars['subCatFeatured']) {
?>
<h2><?php
echo smarty_function_translate(array('text' => '_featured_products'), $this);
?>
</h2>
<?php
$_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "custom:category/productListLayout.tpl", 'smarty_include_vars' => array('layout' => is_array($_tmp = is_array($_tmp = 'FEATURED_LAYOUT') ? $this->_run_mod_handler('config', true, $_tmp) : $this->_plugins['modifier']['config'][0][0]->config($_tmp)) ? $this->_run_mod_handler('default', true, $_tmp, @$this->_tpl_vars['layout']) : smarty_modifier_default($_tmp, @$this->_tpl_vars['layout']), 'products' => $this->_tpl_vars['subCatFeatured'])));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>
<?php
}
?>
<?php
echo smarty_function_renderBlock(array('block' => 'FILTER_TOP'), $this);
示例12: smarty_core_load_plugins
smarty_core_load_plugins(array('plugins' => array(array('function', 'newsUrl', 'custom:news/newsEntry.tpl', 1, false), array('function', 'translate', 'custom:news/newsEntry.tpl', 6, false))), $this);
?>
<h3><a href="<?php
echo smarty_function_newsUrl(array('news' => $this->_tpl_vars['entry']), $this);
?>
"><?php
echo $this->_tpl_vars['entry']['title_lang'];
?>
</a></h3>
<div class="newsDate"><?php
echo $this->_tpl_vars['entry']['formatted_time']['date_medium'];
?>
</div>
<div><?php
echo $this->_tpl_vars['entry']['text_lang'];
?>
</div>
<?php
if ($this->_tpl_vars['entry']['moreText_lang']) {
?>
<div class="newsReadMore">
<center><a href="<?php
echo smarty_function_newsUrl(array('news' => $this->_tpl_vars['entry']), $this);
?>
" class="hvr-sweep-to-left"><?php
echo smarty_function_translate(array('text' => '_read_more'), $this);
?>
</a></center>
</div>
<?php
}
示例13: elseif
</strong>
<?php
} elseif ($this->_tpl_vars['rate']['ShippingService']['formatted_deliveryTimeMaxDays']) {
?>
<?php
echo smarty_function_translate(array('text' => '_deliveryDate_before'), $this);
?>
: <strong><?php
echo is_array($_tmp = $this->_tpl_vars['rate']['ShippingService']['formatted_deliveryTimeMaxDays']['date_long']) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp);
?>
</strong>
<?php
} elseif ($this->_tpl_vars['rate']['ShippingService']['formatted_deliveryTimeMinDays']) {
?>
<?php
echo smarty_function_translate(array('text' => '_deliveryDate_after'), $this);
?>
: <strong><?php
echo is_array($_tmp = $this->_tpl_vars['rate']['ShippingService']['formatted_deliveryTimeMinDays']['date_long']) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp);
?>
</strong>
<?php
}
?>
</p>
</label>
</p>
<?php
}
}
unset($_from);
示例14: smarty_core_load_plugins
<?php
/* Smarty version 2.6.26, created on 2015-12-13 16:27:42
compiled from custom:backend/product/form/specFieldList.tpl */
require_once SMARTY_CORE_DIR . 'core.load_plugins.php';
smarty_core_load_plugins(array('plugins' => array(array('function', 'translate', 'custom:backend/product/form/specFieldList.tpl', 2, false))), $this);
?>
<fieldset class="specification">
<legend><?php
echo smarty_function_translate(array('text' => '_product_specification'), $this);
?>
</legend>
<?php
$_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "custom:backend/eav/fields.tpl", 'smarty_include_vars' => array('fields' => $this->_tpl_vars['specFieldList'], 'item' => $this->_tpl_vars['product'], 'cat' => $this->_tpl_vars['cat'], 'textFieldClass' => 'wide')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
?>
</fieldset>
示例15: smarty_function_link
<div id="handler_SOFT_NAME">
<a href="<?php
echo smarty_function_link(array('controller' => "backend.settings", 'action' => 'disablePrivateLabel'), $this);
?>
" id="disablePrivateLabel" class="menu"><?php
echo smarty_function_translate(array('text' => '_disable_private_label_change'), $this);
?>
</a>
<span class="progressIndicator" style="display: none;"></span>
</div>
<div id="handler_UPDATE_COPY_METHOD">
<a href="<?php
echo smarty_function_link(array('controller' => "backend.update", 'action' => 'testCopy'), $this);
?>
" id="testUpdateCopy" class="menu"><?php
echo smarty_function_translate(array('text' => '_test_update_copy'), $this);
?>
</a>
<span class="progressIndicator" style="display: none;"></span>
<div id="testUpdateCopyResult"></div>
</div>
</div>
<iframe id="upload" name="upload"></iframe>
<?php
$_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "custom:layout/backend/footer.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);