本文整理汇总了PHP中Translate::Instance方法的典型用法代码示例。如果您正苦于以下问题:PHP Translate::Instance方法的具体用法?PHP Translate::Instance怎么用?PHP Translate::Instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Translate
的用法示例。
在下文中一共展示了Translate::Instance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetPagesByGroup
public static function GetPagesByGroup($group)
{
$translate = Translate::Instance();
$tbl = new fpp_page_Model();
$orm = $tbl->db2cls();
$return = null;
$result = $orm->fetch_where(array('group_page' => $group), 'importance_page', 'DESC');
$tr_title_page = Basic::TransVar("title_page");
$tr_content_page = Basic::TransVar("content_page");
foreach ($result as $row) {
$return .= '<li class="supcat">' . html::anchor($translate->getOriginal("page") . '/' . $row->id_page . '/' . Basic::urlizar($row->{$tr_title_page}), $row->{$tr_title_page}) . '</li>';
}
return $return;
}
示例2: __t
public function __t($word)
{
return Translate::Instance()->getOriginal($word);
}
示例3: MasterCategory
public static function MasterCategory()
{
$cat = new fpp_category_Model();
$t = Translate::Instance();
$clave = array_search(self::$groupcat, $cat->group_category_byName);
// $clave = 2;
if (!($clave === false)) {
self::$groupcatname = $clave;
return html::anchor($t->getOriginal("category") . "/{$clave}", "Ver Todos");
}
return null;
}
示例4: WidgetLogin
public static function WidgetLogin()
{
$view = null;
if ((int) @$_SESSION['conf']['client']['id'] == 0) {
$view = View::factory("extras/client/login")->render();
} else {
$t = Translate::Instance();
$cliente = new fpp_client_Model();
$cliente = $cliente->db2cls((int) @$_SESSION['conf']['client']['id']);
$view = View::factory("extras/client/logged")->set('mail', $cliente->mail_client)->set('name', $cliente->fname_client . ' ' . $cliente->lname_client)->set('logout', html::anchor($t->GetOriginal("client") . '/' . $t->GetOriginal("logout"), 'Salir de mi cuenta'))->render();
}
return $view;
}