本文整理匯總了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;
}