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