Optionali18nfalse turns the label translation off.
OptionallocaleLocale for displayLabel: auto keeps the host's labels; a zh or en tag translates common labels.
OptionalrootLabel or slash-separated path of a submenu to return instead of the whole menu. When nothing matches, the whole menu is returned with rootMatched: false.
OptionalwithAdd command counts to submenus.
Parameters for
menu.getMainMenu. Get the main menu as a tree. The host builds it from its menu tree, falls back to the Win32 menus (source: "v1-hmenu"), and as a last resort returns a flat command list (fallback: "flat-mainmenu-commands"). A source that cannot build a tree permits fallback; unreadable state in a built tree fails withOPERATION_FAILEDinstead of returning guessed availability. Root filtering keeps full command paths. Addressability is independent of enabled.