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


PHP locales::display_name方法代码示例

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


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

示例1: show_user_profile

 static function show_user_profile($data)
 {
     $v = new View("user_profile_info.html");
     $fields = array("name" => t("Name"), "locale" => t("Language Preference"), "email" => t("Email"), "full_name" => t("Full name"), "url" => "Web site");
     if (!$data->user->guest) {
         $fields = array("name" => t("Name"), "full_name" => t("Full name"), "url" => "Web site");
     }
     $v->user_profile_data = array();
     foreach ($fields as $field => $label) {
         if (!empty($data->user->{$field})) {
             $value = $data->user->{$field};
             if ($field == "locale") {
                 $value = locales::display_name($value);
             }
             $v->user_profile_data[(string) $label] = $value;
         }
     }
     $data->content[] = (object) array("title" => t("User information"), "view" => $v);
 }
开发者ID:andyst,项目名称:gallery3,代码行数:19,代码来源:gallery_event.php

示例2: if

    <? if (!Input::instance()->get('show_all_l10n_messages')): ?>
      <a style="background-color:#fff" href="<?php 
echo url::site("admin/languages?show_all_l10n_messages=1");
?>
"><?php 
echo t("(Show all)");
?>
</a>
    <? endif; ?>
    </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" => locales::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/>
开发者ID:ChrisRut,项目名称:gallery3,代码行数:31,代码来源:l10n_client.html.php

示例3: t

echo t("Translating Gallery");
?>
</h3>

        <p><?php 
echo t("Follow these steps to begin translating Gallery.");
?>
</p>

        <ul>
          <li><?php 
echo t("Make sure the target language is installed and up to date (check above).");
?>
</li>
          <li><?php 
echo t("Make sure you have selected the right target language (currently %default_locale).", array("default_locale" => locales::display_name()));
?>
</li>
          <li><?php 
echo t("Start the translation mode and the translation interface will appear at the bottom of each Gallery page.");
?>
</li>
        </ul>
        <a href="<?php 
echo url::site("l10n_client/toggle_l10n_mode?csrf=" . access::csrf_token());
?>
"
           class="g-button ui-state-default ui-corner-all ui-icon-left">
          <span class="ui-icon ui-icon-power"></span>
          <?php 
if (Session::instance()->get("l10n_mode", false)) {
开发者ID:CardinS2U,项目名称:gallery3,代码行数:31,代码来源:admin_languages.html.php


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