本文整理汇总了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();
}