本文整理汇总了PHP中CLanguage::GetLangSwitcherArray方法的典型用法代码示例。如果您正苦于以下问题:PHP CLanguage::GetLangSwitcherArray方法的具体用法?PHP CLanguage::GetLangSwitcherArray怎么用?PHP CLanguage::GetLangSwitcherArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLanguage
的用法示例。
在下文中一共展示了CLanguage::GetLangSwitcherArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CleanCache
protected function CleanCache()
{
global $CACHE_MANAGER;
$arLangs = CLanguage::GetLangSwitcherArray();
foreach ($arLangs as $adminLang) {
$CACHE_MANAGER->Clean("b_hot_keys_code" . $adminLang["LID"]);
}
}
示例2: defined
//Help
$module = defined("ADMIN_MODULE_NAME") ? ADMIN_MODULE_NAME : "main";
$page = defined("HELP_FILE") && strpos(HELP_FILE, '/') === false ? HELP_FILE : basename($APPLICATION->GetCurPage());
$aActiveSection = $adminMenu->ActiveSection();
$section = $aActiveSection["help_section"] . "/";
if (defined("HELP_FILE") && strpos(HELP_FILE, $section) === 0) {
$section = "";
}
if (LANGUAGE_ID == "ru") {
$help_link = "http://dev.1c-bitrix.ru/user_help/" . $section . (defined("HELP_FILE") && strpos(HELP_FILE, '/') !== false ? HELP_FILE : $module . "/" . $page);
} else {
$help_link = "http://www.bitrixsoft.com/help/index.html?page=" . urlencode("source/" . $module . "/help/en/" . $page . ".html");
}
$arPanelButtons[] = array("TEXT" => GetMessage("top_panel_help"), "TITLE" => GetMessage("MAIN_HELP"), "LINK" => $help_link, "TARGET" => "_blank", "ICON" => "adm-header-help-btn", "HK_ID" => "top_panel_help");
}
$arLangs = CLanguage::GetLangSwitcherArray();
$arLangButton = array();
$arLangMenu = array();
foreach ($arLangs as $adminLang) {
if ($adminLang['SELECTED']) {
$arLangButton = array("TEXT" => ToUpper($adminLang["LID"]), "TITLE" => GetMessage("top_panel_lang") . " " . $adminLang["NAME"], "LINK" => htmlspecialcharsback($adminLang["PATH"]), "SECTION" => 1, "ICON" => "adm-header-language");
}
$arLangMenu[] = array("TEXT" => '(' . $adminLang["LID"] . ') ' . $adminLang["NAME"], "TITLE" => GetMessage("top_panel_lang") . " " . $adminLang["NAME"], "LINK" => htmlspecialcharsback($adminLang["PATH"]));
}
if (count($arLangMenu) > 1) {
CJSCore::Init(array('admin_interface'));
$arLangButton['MENU'] = $arLangMenu;
}
$arPanelButtons[] = $arLangButton;
$sPubUrl = ($_SESSION["BACK_URL_PUB"] != "" ? htmlspecialcharsbx($_SESSION["BACK_URL_PUB"]) . (strpos($_SESSION["BACK_URL_PUB"], "?") !== false ? "&" : "?") : '/?') . 'back_url_admin=' . urlencode($APPLICATION->GetCurPage() . ($params != "" ? "?" . $params : ""));
$aUserOptGlobal = CUserOptions::GetOption("global", "settings");