本文整理匯總了PHP中LANG::_方法的典型用法代碼示例。如果您正苦於以下問題:PHP LANG::_方法的具體用法?PHP LANG::_怎麽用?PHP LANG::_使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類LANG
的用法示例。
在下文中一共展示了LANG::_方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: browserTest
function browserTest()
{
$ruChecked = !empty($_REQUEST['Lang']) && $_REQUEST['Lang'] == 'RU' ? 'checked' : '';
$enChecked = !empty($ruChecked) ? '' : 'checked';
echo '<form action="./' . basename(__FILE__) . '" method="get" style="float: right">
<label>EN <input type="radio" name="Lang" value="EN" ' . $enChecked . '></label>
<label>RU <input type="radio" name="Lang" value="RU" ' . $ruChecked . '></label>
<input type="submit" value="' . LANG::_('changeLang') . '">
</form>';
Script::write2Log('START BROWSER TEST');
$this->goTest();
$statusTests = '';
if ($this->generalStatus !== TestStatus::OK) {
foreach ($this->logs as $log) {
$error = '';
$subList = '';
if (!empty($log['subList'])) {
$subList .= '<ul>';
foreach ($log['subList'] as $funcName => $func) {
$error = '';
if ($func['log'] !== TestStatus::OK) {
$error = '[ ' . $this->getGoogleLink(str_replace('%func%', $funcName, $log['query'])) . ' ]';
}
$subList .= "<li>{$funcName} - {$func['html']} {$error}</li>";
}
$subList .= "</ul>";
}
if (TestStatus::OK !== $log['status']['log'] && empty($log['subList'])) {
$error = "[" . $this->getGoogleLink($log['query']) . "]";
}
$statusTests .= "<li>{$log['msg']} - {$log['status']['html']} {$error} {$subList} </li>";
}
$statusTests = "<ul>{$statusTests}</ul>";
}
echo '<h2>' . Lang::_('BrowserTest') . '</h2>';
echo "{$statusTests}";
echo '<h4>' . Lang::_('GeneralStatus') . ": {$this->generalStatus}</h4>";
if (!SIMPLE_TEST && $this->fcrdnsStatus !== TestStatus::OK && !empty($this->fcrdnsLog)) {
echo '<h4>' . $this->fcrdnsLog['msg'] . ': ' . $this->fcrdnsLog['status']['html'] . ' [ ' . $this->getGoogleLink($this->fcrdnsLog['query']) . ' ]</h4>';
}
echo '<h5>' . Lang::_('VERSION') . ': ' . VERSION . '</h5>';
Script::write2Log('END BROWSER TEST');
}