當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Translator::_g方法代碼示例

本文整理匯總了PHP中Translator::_g方法的典型用法代碼示例。如果您正苦於以下問題:PHP Translator::_g方法的具體用法?PHP Translator::_g怎麽用?PHP Translator::_g使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Translator的用法示例。


在下文中一共展示了Translator::_g方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: detailsArray

 /**
  * @return array  associative array of item properties in the form "name" => "value"
  */
 function detailsArray()
 {
     $ret = array();
     //generic properties
     if (!empty($this->date)) {
         $ret[$this->translator->_g("Date")] = $this->date;
     }
     if (!empty($this->location)) {
         $ret[$this->translator->_g("Location")] = $this->location;
     }
     if (!empty($this->desc)) {
         $ret[$this->translator->_g("Description")] = $this->desc;
     }
     if (!empty($this->email)) {
         $ret[$this->translator->_g("Email")] = $this->emailLink();
     }
     //image properties
     if (!empty($this->camera)) {
         $ret[$this->translator->_g("Camera")] = $this->camera;
     }
     if (!empty($this->lens)) {
         $ret[$this->translator->_g("Lens")] = $this->lens;
     }
     if (!empty($this->film)) {
         $ret[$this->translator->_g("Film")] = $this->film;
     }
     if (!empty($this->darkroom)) {
         $ret[$this->translator->_g("Darkroom manipulation")] = $this->darkroom;
     }
     if (!empty($this->digital)) {
         $ret[$this->translator->_g("Digital manipulation")] = $this->digital;
     }
     //special properties
     if (!empty($this->copyright)) {
         $ret[$this->translator->_g("Copyright")] = $this->copyright;
     } elseif (!empty($this->artist)) {
         $ret[$this->translator->_g("Copyright")] = $this->artist;
     }
     if ($this->config->show_views) {
         $ret[$this->translator->_g("Viewed")] = $this->translator->_ng("viewed|%s time", "viewed|%s times", $this->hits);
     }
     return $ret;
 }
開發者ID:kyroskoh,項目名稱:singapore-1,代碼行數:46,代碼來源:item.class.php

示例2: imageCommentLink

 /**
  * @return string link for adding a comment to image
  */
 function imageCommentLink()
 {
     return "<a href=\"" . $this->formatURL($this->gallery->idEncoded(), $this->image->id, null, "addcomment") . "\">" . $this->translator->_g("Add a comment") . "</a>";
 }
開發者ID:kyroskoh,項目名稱:singapore-1,代碼行數:7,代碼來源:singapore.class.php


注:本文中的Translator::_g方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。