本文整理匯總了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;
}
示例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>";
}