本文整理汇总了PHP中Resources::GetAvailableLocales方法的典型用法代码示例。如果您正苦于以下问题:PHP Resources::GetAvailableLocales方法的具体用法?PHP Resources::GetAvailableLocales怎么用?PHP Resources::GetAvailableLocales使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resources
的用法示例。
在下文中一共展示了Resources::GetAvailableLocales方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
function display($path)
{
$this->assign('current_locale', WEBIM_CURRENT_LOCALE, false);
$this->assign('available_locales', Resources::GetAvailableLocales(), false);
$this->assign('webim_root', WEBIM_ROOT, false);
$this->assign('whois_url', WEBIM_WHOIS_LINK, false);
$this->assign('browser_charset', BROWSER_CHARSET, false);
// $this->assign('resources', Resources::GetCurrentSet(), false); TODO do we really need this?
$this->assign('product_and_version', Settings::GetProductAndVersion());
$this->assign('product_url', Settings::GetProductURL());
$this->assign('version', WEBIM_VERSION);
$op = SilentGetOperator();
if (isset($op)) {
$this->Assign('operator_name', $op['fullname']);
}
Browser::SendHtmlHeaders();
parent::display($path);
}
示例2: header
}
header("Location: " . WEBIM_ROOT . "/operator/settings.php");
exit;
} else {
foreach ($fields as $f) {
$TML->assign($f, $params[$f]);
}
// $TML->assign('logo', get_mandatory_param('logo'));
$TML->assign('answers_value', $params[$answersKey]);
}
} else {
// not submitted
$TML->assign('answers_value', Settings::Get($answersKey));
$TML->assign(Settings::getInstance()->GetAll());
}
$TML->assign('answers_key', $answersKey);
$TML->assign('availableLocales', Resources::GetAvailableLocales());
$TML->assign('errors', $errors);
$TML->display('settings.tpl');
require_once dirname(__FILE__) . '/inc/admin_epilog.php';
function notEmpty($string)
{
return !empty($string);
}
function remove_empty_strings($strings)
{
$strings = str_replace("\r", "", $strings);
$strarray = explode("\n", $strings);
$strarray = array_filter($strarray, "notEmpty");
return implode("\n", $strarray);
}
示例3: IsLocaleAvailable
static function IsLocaleAvailable($locale)
{
$res = in_array($locale, Resources::GetAvailableLocales());
return $res;
}