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


PHP Translate::Instance方法代碼示例

本文整理匯總了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;
 }
開發者ID:brojasmeneses,項目名稱:floreriarosabel,代碼行數:14,代碼來源:Page.php

示例2: __t

 public function __t($word)
 {
     return Translate::Instance()->getOriginal($word);
 }
開發者ID:brojasmeneses,項目名稱:floreriarosabel,代碼行數:4,代碼來源:Basic.php

示例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;
 }
開發者ID:brojasmeneses,項目名稱:floreriarosabel,代碼行數:12,代碼來源:Category.php

示例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;
 }
開發者ID:brojasmeneses,項目名稱:floreriarosabel,代碼行數:13,代碼來源:Client.php


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