当前位置: 首页>>代码示例>>PHP>>正文


PHP CLanguage::GetLangSwitcherArray方法代码示例

本文整理汇总了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"]);
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:8,代码来源:hot_keys.php

示例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");
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:top_panel.php


注:本文中的CLanguage::GetLangSwitcherArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。