本文整理匯總了PHP中locale::display_name方法的典型用法代碼示例。如果您正苦於以下問題:PHP locale::display_name方法的具體用法?PHP locale::display_name怎麽用?PHP locale::display_name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類locale
的用法示例。
在下文中一共展示了locale::display_name方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: t
<div id="l10n-client" class="hidden">
<div class="labels">
<span class="toggle"><?php
echo t("Translate Text");
?>
</span>
<div class="label strings"><h2><?php
echo t("Page Text");
?>
</h2></div>
<div class="label source"><h2><?php
echo t("Source");
?>
</div>
<div class="label translation"><h2><?php
echo t("Translation to %language", array("language" => locale::display_name()));
?>
</h2></div>
</div>
<div id="l10n-client-string-select">
<ul class="string-list">
<? foreach ($string_list as $string): ?>
<li class="<?php
echo $string["translation"] === "" ? "untranslated" : "translated";
?>
">
<? if (is_array($string["source"])): ?>
[one] - <?php
echo $string["source"]["one"];
?>
<br/>
示例2: defined
<?php defined("SYSPATH") or die("No direct script access.") ?>
<div id="l10n-client" class="hidden">
<div class="labels">
<span class="toggle"><?= t("Translate Text") ?></span>
<div class="label strings"><h2><?= t("Page Text") ?>
<? if (!Input::instance()->get('show_all_l10n_messages')): ?>
<a style="background-color:#fff" href="<?= url::site("admin/languages?show_all_l10n_messages=1") ?>"><?= t("(Show All)") ?></a>
<? endif; ?>
</h2></div>
<div class="label source"><h2><?= t("Source") ?></div>
<div class="label translation"><h2><?= t("Translation to %language",
array("language" => locale::display_name())) ?></h2></div>
</div>
<div id="l10n-client-string-select">
<ul class="string-list">
<? foreach ($string_list as $string): ?>
<li class="<?= $string["translation"] === "" ? "untranslated" : "translated" ?>">
<? if (is_array($string["source"])): ?>
[one] - <?= $string["source"]["one"] ?><br/>
[other] - <?= $string["source"]["other"] ?>
<? else: ?>
<?= $string["source"] ?>
<? endif; ?>
</li>
<? endforeach; ?>
</ul>
<?= $l10n_search_form ?>
</div>
<div id="l10n-client-string-editor">
<div class="source">