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


PHP lang::translate方法代码示例

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


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

示例1: __construct

 public function __construct($requestArray)
 {
     // make an array with posible privileges
     if (!isset($_SESSION['POSIBLEPRIVS'])) {
         $_SESSION['POSIBLEPRIVS'] = array('insert' => lang::translate('act_insert'), 'update' => lang::translate('act_update'), 'delete' => lang::translate('act_delete'), 'list' => lang::translate('act_view'), 'uploadfile' => lang::translate('act_uploadfile'), 'deletefile' => lang::translate('act_deletefile'));
     }
     // get database connection
     $this->DB = new db();
     // set user and pass to be checked
     $this->POST = $requestArray;
     // make login if not logged in
     if (!isset($_SESSION['USERAUTH']) || empty($_SESSION['USERAUTH'])) {
         $_SESSION['USERAUTH'] = $this->login();
     }
     // if cannot make login
     if (empty($_SESSION['USERAUTH'])) {
         return $this->createLoginForm();
     }
     // check login again, for valid info
     if (!$this->check()) {
         return $this->createLoginForm();
     }
     // get user data from $this->login()
     // after we know everything it's OK
     $this->userData = $_SESSION['USERAUTH'];
     // populate privileges array
     $this->getPriv();
 }
开发者ID:amitjoy,项目名称:tap-n-tune,代码行数:28,代码来源:class.user.inc.php

示例2:

<?php

lang::translate('filter_autolinkext_help');
lang::translate('filter_autolink_help');
lang::translate('filter_geshiHl_help');
lang::translate('filter_markdown_help');
lang::translate('filter_markdownExt_help');
lang::translate('filter_media_help');
lang::translate('filter_phphl_help');
lang::translate('filter_markdownNoFollow_help');
lang::translate('filter_stacklink_help');
lang::translate('filter_markdownPublic_help');
开发者ID:gpawlik,项目名称:suited-php-classes,代码行数:12,代码来源:dummy.php

示例3:

<body>
	<form action="" method="post" id="_loginForm">
		<h1><?php 
echo lang::translate('_site_title_');
?>
</h1>
		<?php 
if (user::$error) {
    ?>
<p class="_error"><?php 
    echo user::$error;
    ?>
</p><?php 
}
?>
		<p><input type="text" name="username" id="username" required="required" placeholder="<?php 
echo lang::translate('username');
?>
" autocomplete="off" class="tf keyboardInput" /></p>
		<p><input type="password" name="password" id="password" required="required" placeholder="<?php 
echo lang::translate('password');
?>
" class="tf keyboardInput" /></p>
		<p><input type="submit" name="submit" id="submit" class="submit" value="<?php 
echo lang::translate('login');
?>
" /></p>
		<!--div class="QapTcha"></div-->
	</form>
</body>
</html>
开发者ID:amitjoy,项目名称:admin-panel-framework,代码行数:31,代码来源:_loginform.php

示例4: getCurrentfiltersFrontEnd

 private function getCurrentfiltersFrontEnd()
 {
     // if no filter, show nothing
     if (empty($this->filter)) {
         return '';
     }
     // get each filter
     $out = '';
     foreach ($this->filter as $field => $options) {
         $tmpFilter = $this->filter;
         unset($tmpFilter[$field]);
         $out .= '<p><a href="' . $this->url(array('filter' => $tmpFilter)) . '">' . lang::translate('remove') . '</a> ' . $this->title(isset($this->fields[$field]['label']) ? $this->fields[$field]['label'] : $field) . ' ' . $options[1] . ' ' . $this->h($options[0]) . '</p>';
     }
     return $out;
 }
开发者ID:amitjoy,项目名称:admin-panel-framework,代码行数:15,代码来源:class.admin.inc.php

示例5: substr

                    $filtersString .= $filterField . ', ';
                }
                $filtersString = substr($filtersString, 0, -2) . ')';
            }
            echo '<p style="font-size:11px;padding:2px 5px;background:#fff;margin:0 0 2px 0">- ' . lang::translate('download_file') . ' (<a href="uploads/_excels_/' . $excelFilename[0] . '">' . $excelFilename[0] . '</a>) ' . lang::translate('exported_at') . ' ' . $excelFilename[1] . $filtersString . '</p>';
        }
        echo '
							<p style="font-size:11px;padding:2px 5px;margin:0 0 2px 0;background:#ddd"><a href="' . $a->url() . 'clearexcels=1" onclick="return confirm(\'' . lang::translate('clear_question') . '\')">' . lang::translate('clear_this_listing') . '</a> ' . lang::translate('csv_files_will_remain_in_') . '</p>
							<p style="clear:both;padding:0;margin:0">&nbsp;</p>';
    }
    // create filter DIV
    echo '
						<div id="_filterZone">' . $a->filtersFrontEnd . '</div>
						<p id="_submitFilters">
							<a href="#" id="_applyFilters" onclick="return applyCurrentFilters()">' . lang::translate('apply_filters') . '</a>
							<a href="#" id="_applyFilters_fake" onclick="return false">' . lang::translate('wait') . '</a>
						</p>
					';
}
// some free text before
echo $a->textBefore;
// if error, show
if (!empty($a->error)) {
    echo '<p class="_error">' . implode('<br />', $a->error) . '</p>';
}
// for (insert or update)
echo $a->form;
// listing
echo $a->listTable;
// some free text after
echo $a->textAfter;
开发者ID:amitjoy,项目名称:tap-n-tune,代码行数:31,代码来源:index.php

示例6: array

<?php

$a->table = '_adminroles';
$a->primaryKey = 'idrole';
$a->order = array('name' => 'asc');
$a->showRecords = 20;
$a->charsLimit = 50;
$a->gotoAfterAction = 'update';
//$a->captcha = true;
$a->fields = array('name' => array('type' => 'text', 'width' => 150, 'label' => 'Role name', 'noduplicates' => true, 'required' => true));
if ($a->edit != 0 && $a->show == 'update') {
    //$sql = "UPDATE _adminroles SET stock = 'AMIT' WHERE idrole = $a->edit";
    //mysql_query($sql) or die("FF");
    $a->textAfter = '
	<div id="makeModalWindow" style="display:none"><iframe name="priviledge" style="width:920px;height:500px;border:0 none;" src="cont_special_adm_roles_to_privs.php?role=' . $a->edit . '"></iframe></div>
	<div style="padding:10px 0 10px ' . ($a->defaultValues['formLeftWidth'] + 3) . 'px"><img src="images/privilege.png"/>&nbsp;
		<a href="#" onclick="return makeIframe(\'makeModalWindow\', { width:950, height:550, title:\'' . lang::translate('set_privileges_for_role') . '\' })">' . lang::translate('set_privileges_for_role') . '</a>
	</div>
	';
}
//$a->textAfter = '<p>&nbsp;</p>'.highlight_file(__FILE__, true);
开发者ID:amitjoy,项目名称:admin-panel-framework,代码行数:21,代码来源:cont-_adm_roles.inc.php

示例7: foreach

foreach ($_SESSION['menu_items'] as $page => $title) {
    if (is_array($title)) {
        foreach ($title as $page1 => $title1) {
            echo '<div style="width:230px;float:left">
				<h2 style="padding:10px 0 2px 0;font-size:14px">
				<label><input type="checkbox" value="1" onchange="if(this.checked) { $(\'.ckb' . $page1 . '\').attr(\'checked\',\'checked\'); } else { $(\'.ckb' . $page1 . '\').removeAttr(\'checked\'); }" /> ' . $title1 . '</label></h2>';
            foreach ($_SESSION['POSIBLEPRIVS'] as $priv1 => $tit1) {
                echo '<label><input type="checkbox" class="ckb' . $page1 . '"' . (isAction($page1, $priv1) ? ' checked="checked"' : '') . ' name="priv_' . $page1 . '___' . $priv1 . '" id="priv_' . $page1 . '___' . $priv1 . '" /> ' . $tit1 . '</label><br />';
            }
            echo '</div>';
        }
    } else {
        echo '<div style="width:230px;float:left">
			<h2 style="padding:10px 0 2px 0;font-size:14px">
			<label><input type="checkbox" value="1" onchange="if(this.checked) { $(\'.ckb' . $page . '\').attr(\'checked\',\'checked\'); } else { $(\'.ckb' . $page . '\').removeAttr(\'checked\'); }" /> ' . $title . '</label></h2>';
        foreach ($_SESSION['POSIBLEPRIVS'] as $priv => $tit) {
            echo '<label><input type="checkbox" class="ckb' . $page . '"' . (isAction($page, $priv) ? ' checked="checked"' : '') . ' name="priv_' . $page . '___' . $priv . '" id="priv_' . $page . '___' . $priv . '" /> ' . $tit . '</label><br />';
        }
        echo '</div>';
    }
}
?>
	<p style="padding:10px 0;clear:both"><input type="submit" class="submit" name="submitPrivs" value="<?php 
echo lang::translate('submit');
?>
" /></p>
	
	</form>
	
</body>
</html>
开发者ID:amitjoy,项目名称:tap-n-tune,代码行数:31,代码来源:cont_special_adm_roles_to_privs.php


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