当前位置: 首页>>代码示例>>PHP>>正文


PHP AppLocale::translate方法代码示例

本文整理汇总了PHP中AppLocale::translate方法的典型用法代码示例。如果您正苦于以下问题:PHP AppLocale::translate方法的具体用法?PHP AppLocale::translate怎么用?PHP AppLocale::translate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AppLocale的用法示例。


在下文中一共展示了AppLocale::translate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __

/**
 * Wrapper around PKPLocale::translate().
 *
 * Enables us to work with translated strings everywhere without
 * introducing a lot of duplicate code and without getting
 * blisters on our fingers.
 *
 * This is similar to WordPress' solution for translation, see
 * <http://codex.wordpress.org/Translating_WordPress>.
 *
 * @see PKPLocale::translate()
 *
 * @param $key string
 * @param $params array named substitution parameters
 * @param $locale string the locale to use
 * @return string
 */
function __($key, $params = array(), $locale = null)
{
    return AppLocale::translate($key, $params, $locale);
}
开发者ID:jalperin,项目名称:pkp-lib,代码行数:21,代码来源:PKPLocale.inc.php

示例2: is_array

    ?>
</p>
		<?php 
    echo $this->_plugins['function']['load_url_in_div'][0][0]->smartyLoadUrlInDiv(array('id' => 'lookupFilterGridContainer', 'loadMessageId' => "manager.setup.filter.lookup.grid.loadMessage", 'url' => $this->_tpl_vars['lookupFilterGridUrl']), $this);
    ?>

		<h4><?php 
    echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "manager.setup.citationOutput"), $this);
    ?>
</h4>
		<p><?php 
    echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "manager.setup.citationOutputStyleDescription"), $this);
    ?>
</p>
		<?php 
    echo $this->_plugins['function']['fbvElement'][0][0]->smartyFBVElement(array('type' => 'select', 'id' => 'metaCitationOutputFilterSelect', 'name' => 'metaCitationOutputFilterId', 'from' => $this->_tpl_vars['metaCitationOutputFilters'], 'translate' => false, 'selected' => is_array($_tmp = $this->_tpl_vars['metaCitationOutputFilterId']) ? $this->_run_mod_handler('escape', true, $_tmp) : $this->_plugins['modifier']['escape'][0][0]->smartyEscape($_tmp), 'defaultValue' => "-1", 'defaultLabel' => is_array($_tmp = "manager.setup.filter.pleaseSelect") ? $this->_run_mod_handler('translate', true, $_tmp) : AppLocale::translate($_tmp)), $this);
    ?>

	</div>
	<?php 
    echo '<script type=\'text/javascript\'>
		$(function(){
			// jQuerify DOM elements
			$metaCitationsCheckbox = $(\'#metaCitations\');
			$metaCitationsSetupBox = $(\'#citationFilterSetupToggle\');

			// Set the initial state
			initialCheckboxState = $metaCitationsCheckbox.attr(\'checked\');
			if (initialCheckboxState) {
				$metaCitationsSetupBox.css(\'display\', \'block\');
			} else {
开发者ID:EreminDm,项目名称:water-cao,代码行数:31,代码来源:%%7E^7E0^7E0382DA%%step3.tpl.php

示例3: smarty_core_load_plugins

smarty_core_load_plugins(array('plugins' => array(array('modifier', 'translate', 'controllers/grid/gridHeader.tpl', 14, false), array('function', 'translate', 'controllers/grid/gridHeader.tpl', 22, false))), $this);
?>
<div class="grid_header">
	<?php 
echo $this->_tpl_vars['gridFilterForm'];
?>

	<?php 
if ($this->_tpl_vars['grid']->getActions(@GRID_ACTION_POSITION_ABOVE) || $this->_tpl_vars['grid']->getTitle()) {
    ?>
		<div class="grid_header_bar">
			<?php 
    if ($this->_tpl_vars['grid']->getTitle()) {
        ?>
<h3><?php 
        echo is_array($_tmp = $this->_tpl_vars['grid']->getTitle()) ? $this->_run_mod_handler('translate', true, $_tmp) : AppLocale::translate($_tmp);
        ?>
</h3><?php 
    }
    ?>
			<?php 
    if ($this->_tpl_vars['grid']->getActions(@GRID_ACTION_POSITION_ABOVE)) {
        ?>
				<?php 
        $_smarty_tpl_vars = $this->_tpl_vars;
        $this->_smarty_include(array('smarty_include_tpl_file' => "controllers/grid/gridActionsAbove.tpl", 'smarty_include_vars' => array('actions' => $this->_tpl_vars['grid']->getActions(@GRID_ACTION_POSITION_ABOVE), 'gridId' => $this->_tpl_vars['staticId'])));
        $this->_tpl_vars = $_smarty_tpl_vars;
        unset($_smarty_tpl_vars);
        ?>
			<?php 
    }
开发者ID:EreminDm,项目名称:water-cao,代码行数:31,代码来源:%%A4^A4E^A4E7F5B1%%gridHeader.tpl.php

示例4: smarty_core_load_plugins

<?php

/* Smarty version 2.6.26, created on 2015-02-19 14:37:05
   compiled from manager/people/searchUsers.tpl */
require_once SMARTY_CORE_DIR . 'core.load_plugins.php';
smarty_core_load_plugins(array('plugins' => array(array('function', 'translate', 'manager/people/searchUsers.tpl', 13, false), array('function', 'url', 'manager/people/searchUsers.tpl', 17, false), array('function', 'html_options_translate', 'manager/people/searchUsers.tpl', 51, false), array('function', 'sort_heading', 'manager/people/searchUsers.tpl', 111, false), array('function', 'icon', 'manager/people/searchUsers.tpl', 127, false), array('function', 'page_info', 'manager/people/searchUsers.tpl', 153, false), array('function', 'page_links', 'manager/people/searchUsers.tpl', 154, false), array('modifier', 'translate', 'manager/people/searchUsers.tpl', 13, false), array('modifier', 'assign', 'manager/people/searchUsers.tpl', 13, false), array('modifier', 'escape', 'manager/people/searchUsers.tpl', 26, false), array('modifier', 'concat', 'manager/people/searchUsers.tpl', 125, false), array('modifier', 'to_array', 'manager/people/searchUsers.tpl', 126, false), array('modifier', 'truncate', 'manager/people/searchUsers.tpl', 127, false), array('block', 'iterate', 'manager/people/searchUsers.tpl', 117, false))), $this);
echo '';
echo is_array($_tmp = $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "manager.people.roleEnrollment", 'role' => is_array($_tmp = $this->_tpl_vars['roleName']) ? $this->_run_mod_handler('translate', true, $_tmp) : AppLocale::translate($_tmp)), $this)) ? $this->_run_mod_handler('assign', true, $_tmp, 'pageTitleTranslated') : $this->_plugins['modifier']['assign'][0][0]->smartyAssign($_tmp, 'pageTitleTranslated');
echo '';
$_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "common/header.tpl", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
echo '';
?>


<form id="disableUser" method="post" action="<?php 
echo $this->_plugins['function']['url'][0][0]->smartyUrl(array('op' => 'disableUser'), $this);
?>
">
	<input type="hidden" name="reason" value=""/>
	<input type="hidden" name="userId" value=""/>
</form>

<script type="text/javascript">
<?php 
echo '
<!--
function confirmAndPrompt(userId) {
	var reason = prompt(\'';
开发者ID:EreminDm,项目名称:water-cao,代码行数:31,代码来源:%%A7^A73^A7374CC1%%searchUsers.tpl.php

示例5: while

$_block_repeat = true;
$this->_plugins['block']['iterate'][0][0]->smartyIterate($this->_tag_stack[count($this->_tag_stack) - 1][1], null, $this, $_block_repeat);
while ($_block_repeat) {
    ob_start();
    ?>
	<tr valign="top">
		<td><?php 
    echo is_array($_tmp = $this->_tpl_vars['logEntry']->getDateLogged()) ? $this->_run_mod_handler('date_format', true, $_tmp, $this->_tpl_vars['dateFormatShort']) : smarty_modifier_date_format($_tmp, $this->_tpl_vars['dateFormatShort']);
    ?>
</td>
		<td>
			<?php 
    $this->assign('emailString', is_array($_tmp = $this->_tpl_vars['logEntry']->getUserFullName()) ? $this->_run_mod_handler('concat', true, $_tmp, " <", $this->_tpl_vars['logEntry']->getUserEmail(), ">") : $this->_plugins['modifier']['concat'][0][0]->smartyConcat($_tmp, " <", $this->_tpl_vars['logEntry']->getUserEmail(), ">"));
    ?>
			<?php 
    echo is_array($_tmp = $this->_plugins['function']['url'][0][0]->smartyUrl(array('page' => 'user', 'op' => 'email', 'to' => is_array($_tmp = $this->_tpl_vars['emailString']) ? $this->_run_mod_handler('to_array', true, $_tmp) : $this->_plugins['modifier']['to_array'][0][0]->smartyToArray($_tmp), 'redirectUrl' => $this->_tpl_vars['currentUrl'], 'subject' => is_array($_tmp = $this->_tpl_vars['logEntry']->getEventTitle()) ? $this->_run_mod_handler('translate', true, $_tmp) : AppLocale::translate($_tmp), 'articleId' => $this->_tpl_vars['submission']->getId()), $this)) ? $this->_run_mod_handler('assign', true, $_tmp, 'url') : $this->_plugins['modifier']['assign'][0][0]->smartyAssign($_tmp, 'url');
    ?>

			<?php 
    echo is_array($_tmp = $this->_tpl_vars['logEntry']->getUserFullName()) ? $this->_run_mod_handler('escape', true, $_tmp) : $this->_plugins['modifier']['escape'][0][0]->smartyEscape($_tmp);
    ?>
 <?php 
    echo $this->_plugins['function']['icon'][0][0]->smartyIcon(array('name' => 'mail', 'url' => $this->_tpl_vars['url']), $this);
    ?>

		</td>
		<td>
			<?php 
    echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => $this->_tpl_vars['logEntry']->getEventTitle()), $this);
    ?>
开发者ID:EreminDm,项目名称:water-cao,代码行数:30,代码来源:%%D4^D4C^D4C18A96%%submissionHistory.tpl.php


注:本文中的AppLocale::translate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。