Category / Section
How to localize the customization dialog of XPMenu control?
1 min read
Localize the customization dialog
We can localize the customization dialog string by return the localized strings corresponding to the string identifiers with the help of ILocalizationProvider. The following codes are illustrating to customize the XP Menus customization dialog in German language.
CustomizeDialogString.cs
public class CustomizeDialogString : ILocalizationProvider { public string GetLocalizedString(System.Globalization.CultureInfo culture, string name, object ctrl) { switch(name) { case ToolsResourceIdentifiers.BarCustomizationDialogNew: return "Neu"; case ToolsResourceIdentifiers.BarCustomizationDialogDelete: return "Löschen"; case ToolsResourceIdentifiers.BarCustomizationDialogButtonReset: return "sich ausruhen"; case ToolsResourceIdentifiers.BarCustomizationDialogClose: return "Schließen"; case ToolsResourceIdentifiers.BarCustomizationDialogTabToolbars: return "Symbolleiste"; case ToolsResourceIdentifiers.BarCustomizationDialogTabCommands: return "Aufträge"; case ToolsResourceIdentifiers.BarCustomizationDialogTabOptions: return "Optionen"; case ToolsResourceIdentifiers.BarCustomizationDialogCategories: return "Kategorien"; case ToolsResourceIdentifiers.BarCustomizationDialogCommands: return "Commandes"; case ToolsResourceIdentifiers.BarCustomizationDialogResetCustomization: return "Anpassung zurücksetzen"; case ToolsResourceIdentifiers.BarCustomizationDialogResetPartialMenus: return "Setzen Si meineNutzundaten"; case ToolsResourceIdentifiers.BarCustomizationDialogLargeIcons: return "Große Ikonen"; case ToolsResourceIdentifiers.BarCustomizationDialogPersonalizedMenus: return "Benutzerdefinierte Menüs und Symbolleisten"; case ToolsResourceIdentifiers.BarCustomizationDialogOther: return "autre"; case ToolsResourceIdentifiers.BarCustomizationDialogAlwaysFullMenu: return "vollständige Menüsanzeigen"; case ToolsResourceIdentifiers.BarCustomizationDialogExpandAfterDelay: return "komplette Menüs nach Verzögerung anzeigen"; case ToolsResourceIdentifiers.BarCustomizationDialogCaption: return "Personifizieren"; default: return string.Empty; } } }
Form1.cs
public Form1() { LocalizationProvider.Provider = new CustomizeDialogString(); InitializeComponent(); }
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/LocalizationSample1880339007.zip