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


PHP Internationalization::bootstrap方法代碼示例

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


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

示例1: session_start

#start session
session_start();

define('URL',rtrim((Bootstrap::https()?'https':'http').'://'.$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']),'setup'));

#define paths
define('INC_DIR',dirname(__file__).'/inc/'); //local include dir!

#required files
require_once(INCLUDE_DIR.'class.setup.php');
require_once(INCLUDE_DIR.'class.validator.php');
require_once(INCLUDE_DIR.'class.passwd.php');
require_once(INCLUDE_DIR.'class.format.php');
require_once(INCLUDE_DIR.'class.misc.php');
require_once INCLUDE_DIR.'mysqli.php';
require_once INCLUDE_DIR.'class.i18n.php';

Internationalization::bootstrap();

// Set browser-preferred language (if installed)
require_once INCLUDE_DIR.'class.translation.php';

// Support flags in the setup portal too
if (isset($_GET['lang']) && $_GET['lang']) {
    $_SESSION['client:lang'] = $_GET['lang'];
}
TextDomain::configureForUser();

?>
開發者ID:KingsleyGU,項目名稱:osticket,代碼行數:29,代碼來源:setup.inc.php

示例2: start

 function start()
 {
     // Prep basic translation support
     Internationalization::bootstrap();
     if (!($ost = new osTicket())) {
         return null;
     }
     //Set default time zone... user/staff settting will override it (on login).
     $_SESSION['TZ_OFFSET'] = $ost->getConfig()->getTZoffset();
     $_SESSION['TZ_DST'] = $ost->getConfig()->observeDaylightSaving();
     // Bootstrap installed plugins
     $ost->plugins->bootstrap();
     // Mirror content updates to the search backend
     $ost->searcher = new SearchInterface();
     return $ost;
 }
開發者ID:dmiguel92,項目名稱:osTicket-1.8,代碼行數:16,代碼來源:class.osticket.php


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