本文整理汇总了PHP中TTi18n::chooseBestLocale方法的典型用法代码示例。如果您正苦于以下问题:PHP TTi18n::chooseBestLocale方法的具体用法?PHP TTi18n::chooseBestLocale怎么用?PHP TTi18n::chooseBestLocale使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TTi18n
的用法示例。
在下文中一共展示了TTi18n::chooseBestLocale方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
// Comment out No-Cache and Pragma: No-Cache to fix issue.
header('Cache-Control: no-cache');
//Adding FALSE here breaks IE.
header('Cache-Control: post-check=0,pre-check=0');
header('Cache-Control: max-age=0');
header('Pragma: public');
}
//Do not overwrite a previously sent content-type header, this breaks WAP.
if (!isset($enable_wap)) {
header('Content-Type: text/html; charset=UTF-8');
}
$permission = new Permission();
$authentication = new Authentication();
if (isset($authenticate) and $authenticate === FALSE) {
Debug::text('Bypassing Authentication', __FILE__, __LINE__, __METHOD__, 10);
TTi18n::chooseBestLocale();
} else {
//Increase timeout on WAP devices, so they don't have to login as often.
if (isset($enable_wap) and $enable_wap == TRUE) {
$authentication->setIdle(32400);
//9hrs
} elseif (isset($config_vars['other']['web_session_timeout']) and $config_vars['other']['web_session_timeout'] != '') {
$authentication->setIdle((int) $config_vars['other']['web_session_timeout']);
}
if ($authentication->Check() === TRUE) {
/*
* Get default interface data here. Things like User info, Company info etc...
*/
$current_user = $authentication->getObject();
Debug::text('User Authenticated: ' . $current_user->getUserName() . ' Created Date: ' . $authentication->getCreatedDate(), __FILE__, __LINE__, __METHOD__, 10);
$clf = new CompanyListFactory();