當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Loc::getMsg方法代碼示例

本文整理匯總了PHP中Bitrix\Main\Localization\Loc::getMsg方法的典型用法代碼示例。如果您正苦於以下問題:PHP Loc::getMsg方法的具體用法?PHP Loc::getMsg怎麽用?PHP Loc::getMsg使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Bitrix\Main\Localization\Loc的用法示例。


在下文中一共展示了Loc::getMsg方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

$days = array(Loc::getMsg("culture_su"), Loc::getMsg("culture_mo"), Loc::getMsg("culture_tu"), Loc::getMsg("culture_we"), Loc::getMsg("culture_th"), Loc::getMsg("culture_fr"), Loc::getMsg("culture_sa"));
while ($culture = $data->Fetch()) {
    $id = htmlspecialcharsbx($culture["ID"]);
    $name = htmlspecialcharsbx($culture["NAME"]);
    $row =& $adminList->AddRow($id, $culture, "culture_edit.php?ID=" . $id . "&lang=" . LANGUAGE_ID, Loc::getMsg("LANG_EDIT_TITLE"));
    $row->AddViewField("ID", $id);
    $row->AddField("NAME", '<a href="culture_edit.php?ID=' . $id . '&amp;lang=' . LANGUAGE_ID . '" title="' . Loc::getMsg("LANG_EDIT_TITLE") . '">' . $name . '</a>', $name);
    $row->AddInputField("CODE");
    $row->AddInputField("FORMAT_DATE");
    $row->AddInputField("FORMAT_DATETIME");
    $row->AddInputField("FORMAT_NAME");
    $row->AddViewField("WEEK_START", $days[$culture["WEEK_START"]]);
    $row->AddInputField("CHARSET");
    $row->AddViewField("DIRECTION", $culture["DIRECTION"] == Culture::LEFT_TO_RIGHT ? Loc::getMsg("culture_left_to_right") : Loc::getMsg("culture_right_to_left"));
    $arActions = array();
    $arActions[] = array("ICON" => "edit", "TEXT" => Loc::getMsg("CHANGE"), "ACTION" => $adminList->ActionRedirect("culture_edit.php?ID=" . $f_ID));
    if ($isAdmin) {
        $arActions[] = array("ICON" => "copy", "TEXT" => Loc::getMsg("COPY"), "ACTION" => $adminList->ActionRedirect("culture_edit.php?COPY_ID=" . $f_ID));
        $arActions[] = array("SEPARATOR" => true);
        $arActions[] = array("ICON" => "delete", "TEXT" => Loc::getMsg("DELETE"), "ACTION" => "if(confirm('" . Loc::getMsg('CONFIRM_DEL') . "')) " . $adminList->ActionDoGroup($f_ID, "delete"));
    }
    $row->AddActions($arActions);
}
$adminList->AddFooter(array(array("title" => GetMessage("MAIN_ADMIN_LIST_SELECTED"), "value" => $data->SelectedRowsCount()), array("counter" => true, "title" => GetMessage("MAIN_ADMIN_LIST_CHECKED"), "value" => "0")));
$adminList->AddGroupActionTable(array("delete" => GetMessage("MAIN_ADMIN_LIST_DELETE")));
$aContext = array(array("TEXT" => Loc::getMsg("ADD_LANG"), "LINK" => "culture_edit.php?lang=" . LANGUAGE_ID, "TITLE" => Loc::getMsg("ADD_LANG_TITLE"), "ICON" => "btn_new"));
$adminList->AddAdminContextMenu($aContext);
$adminList->CheckListMode();
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/prolog_admin_after.php";
$adminList->DisplayList();
require $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/include/epilog_admin.php";
開發者ID:nProfessor,項目名稱:Mytb,代碼行數:31,代碼來源:culture_admin.php


注:本文中的Bitrix\Main\Localization\Loc::getMsg方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。