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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to localize the WinForms MessageBoxAdv control?

Platform: WinForms |
Control: MessageBoxAdv


Localization is the process of making application multilingual by formatting the content according to the cultures. MessageBoxAdv control can be localized in any Languages, based on application requirement by following below steps.

Step 1: Need to initialize the LocalizationProvider class, inherited from ILocalizationProvider Interface, before the InitializeComponent call in the constructor of the application.

Step 2: It will add the GetLocalizedString function in the LocalizationProvider class. In that it is needed to provide the Localization content, for the required components used in MessageBoxAdv control.


For example,

Here, MessageBoxAdv control is localized in German Language.



LocalizationProvider.Provider = new Localizer();
// localizer inherits the interface ILocationProvider
public class Localizer : ILocalizationProvider
     #region ILocalizationProvider Members
     public string GetLocalizedString(System.Globalization.CultureInfo culture, string name,object obj)
            switch (name)
                #region MessageBoxAdv
                ///Retry Button in German Language
                case ResourceIdentifiers.Retry:
                    return "Wiederholen";
                ///Abort Button in German Language
                case ResourceIdentifiers.Abort:
                    return "Abbrechen";
                ///Ignore Button in German Language 
                case ResourceIdentifiers.Ignore:
                    return "ignorieren";
          /// default
                    return string.Empty;
//MessageBox show
MessageBoxAdv.Show("Metro Theme Anpassung", "Das ist Syncfusion MessageBoxAdv Control", MessageBoxButtons.AbortRetryIgnore);


LocalizationProvider.Provider = New Localizer()
' localizer inherits the interface ILocationProvider
Public Class Localizer Implements ILocalizationProvider
#Region "ILocalizationProvider Members"
Public Function GetLocalizedString(ByVal culture As System.Globalization.CultureInfo, ByVal name As String, ByVal obj As Object) As String Implements ILocalizationProvider.GetLocalizedString 
        Select Case name
 '''Retry Button in German Language
 Case ResourceIdentifiers.Retry
          Return "Wiederholen"
 '''Abort Button in German Language
 Case ResourceIdentifiers.Abort
          Return "Abbrechen"
 '''Ignore Button in German Language
 Case ResourceIdentifiers.Ignore
          Return "ignorieren"
 ''' default
 Case Else
          Return String.Empty
 End Select       
End Function
#End Region
'MessageBox show
MessageBoxAdv.Show("Metro Theme Anpassung", "Das ist Syncfusion MessageBoxAdv Control", MessageBoxButtons.AbortRetryIgnore)



Localize the MessageBoxAdv control

Figure 1: localization.



C#: MessageBoxAdvLocalization

VB: MessageBoxAdvLocalization

Reference link: https://help.syncfusion.com/windowsforms/messagebox/localization

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
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