本文整理匯總了PHP中Resources::SetLanguage方法的典型用法代碼示例。如果您正苦於以下問題:PHP Resources::SetLanguage方法的具體用法?PHP Resources::SetLanguage怎麽用?PHP Resources::SetLanguage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Resources
的用法示例。
在下文中一共展示了Resources::SetLanguage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
protected function __construct($languageCode = null)
{
$resources = new Resources();
if (!empty($languageCode)) {
$resources->SetLanguage($languageCode);
}
$this->email = new SmartyPage($resources);
$this->Set('ScriptUrl', Configuration::Instance()->GetScriptUrl());
$this->Set('Charset', $resources->Charset);
}
示例2: __construct
public function __construct($languageCode = null)
{
$this->Resources = new Resources();
if (!empty($languageCode)) {
$this->Resources->SetLanguage($languageCode);
}
$this->assign('Charset', $this->Resources->Charset);
$this->assign('ScriptUrl', Configuration::Instance()->GetScriptUrl());
$this->template_dir = ROOT_DIR . 'lang';
$this->compile_dir = ROOT_DIR . 'tpl_c';
$this->config_dir = ROOT_DIR . 'configs';
$this->cache_dir = ROOT_DIR . 'cache';
$cacheTemplates = Configuration::Instance()->GetKey(ConfigKeys::CACHE_TEMPLATES, new BooleanConverter());
$this->compile_check = !$cacheTemplates;
// should be set to false in production
$this->force_compile = !$cacheTemplates;
// should be set to false in production
$this->RegisterFunctions();
}