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