public static void LocalizeMenu(ICollection <MenuItemModel> menu, string locale) { if (menu == null) { return; } foreach (var item in menu) { item.Text = LocalePlugin.GetString(item.CommandId, locale); if (item.Items != null && item.Items.Any()) { LocalizeMenu((ICollection <MenuItemModel>)item.Items, locale); } } }
public void Localize(string locale) { LabelAddText = LocalePlugin.GetString(LocaleConstants.LABEL_ADDITEMS); VcUtils.LocalizeMenu(ListMenu, locale); }
public static void Init() { LocalePlugin.Init(); }