)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to localize the customization dialog of XPMenu control?

Platform: WinForms |
Control: MainFrameBarManager |
Published Date: June 14, 2018 |
Last Revised Date: January 5, 2020 |
.NET Framework: 4

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();
}

Show the customization dialog window

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/LocalizationSample1880339007.zip

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon