本文整理匯總了PHP中Internationalization::getConfiguredSystemLanguages方法的典型用法代碼示例。如果您正苦於以下問題:PHP Internationalization::getConfiguredSystemLanguages方法的具體用法?PHP Internationalization::getConfiguredSystemLanguages怎麽用?PHP Internationalization::getConfiguredSystemLanguages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Internationalization
的用法示例。
在下文中一共展示了Internationalization::getConfiguredSystemLanguages方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __
echo ROOT_PATH;
?>
index.php" title="<?php
echo __('Support Center');
?>
"><?php
echo $title;
?>
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="pps-navbar-collapse-1">
<ul class="nav navbar-nav">
<?php
if (($all_langs = Internationalization::getConfiguredSystemLanguages()) && count($all_langs) > 1) {
$qs = array();
parse_str($_SERVER['QUERY_STRING'], $qs);
?>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-flag"></i><span class="caret"></span></a>
<ul class="dropdown-menu" role="menu"><?php
foreach ($all_langs as $code => $info) {
list($lang, $locale) = explode('_', $code);
$qs['lang'] = $code;
?>
<li><a class="flag flag-<?php
echo strtolower($locale ?: $info['flag'] ?: $lang);
?>
"
href="?<?php
示例2: __
</div>
</td>
</tr>
<?php
if ($cfg->getSecondaryLanguages()) {
?>
<tr>
<td width="180">
<?php
echo __('Preferred Language');
?>
:
</td>
<td>
<?php
$langs = Internationalization::getConfiguredSystemLanguages();
?>
<select name="lang">
<option value="">— <?php
echo __('Use Browser Preference');
?>
—</option>
<?php
foreach ($langs as $l) {
$selected = $info['lang'] == $l['code'] ? 'selected="selected"' : '';
?>
<option value="<?php
echo $l['code'];
?>
" <?php
echo $selected;