本文整理汇总了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">