DotNetBar System text refers to the text displayed on Customize Dialogs, Add/Remove Items menu etc.

Localization of built-in system text used by DotNetBar is done using DotNetBarManager.LocalizeString event. In this event handler you set the LocalizedValue property to the string you want displayed for given Key. You set the Handled property to true to indicate that you want your value used instead of the system value.

If you want to handle localization on global basis for all DotNetBar controls handle LocalizationKeys.LocalizeString static event. This will allow you to use single event handler to localize all DotNetBar controls.

Here is an example of adding LocalizeString event handler in Main method:

C#

///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
 
    DevComponents.DotNetBar.LocalizationKeys.LocalizeString += new DevComponents.DotNetBar.DotNetBarManager.LocalizeStringEventHandler(LocalizeString);
 
    Application.Run(new Form1());
}
 
static void LocalizeString(object sender, DevComponents.DotNetBar.LocalizeEventArgs e)
{
    Console.WriteLine(e.Key);
}

VB

'''
''' The main entry point for the application.
'''
 _
Private Shared Sub Main()
 
    Application.EnableVisualStyles()
    Application.SetCompatibleTextRenderingDefault(False)
 
    AddHandler DevComponents.DotNetBar.LocalizationKeys.LocalizeString, AddressOf LocalizeString
 
    Application.Run(New Form1())
End Sub
 
Private Shared Sub LocalizeString(sender As Object, e As DevComponents.DotNetBar.LocalizeEventArgs)
    Console.WriteLine(e.Key)
End Sub

The localization keys can be found as static members of LocalizationKeys class. This class is also documented in help file.

For example this is how the event handler for LocalizeString event might look for the NavigationPane control:

C#

private void navigationPane1_LocalizeString(object sender, DevComponents.DotNetBar.LocalizeEventArgs e)
{
    if (e.Key == LocalizationKeys.NavBarOptions)
    {
        e.LocalizedValue = "Optionen";
        e.Handled = true;
    }
    else if (e.Key == LocalizationKeys.NavBarShowFewerButtons)
    {
        e.LocalizedValue = "Weniger Oberflächen Anzeigen";
        e.Handled = true;
    }
    else if (e.Key == LocalizationKeys.NavBarShowMoreButtons)
    {
        e.LocalizedValue = "Mehr Oberflächen Anzeigen";
        e.Handled = true;
    }
    else if (e.Key == LocalizationKeys.CustomizeItemAddRemove)
    {
        e.LocalizedValue = "&Schaltflächen hinzufügen oder entfernen";
        e.Handled = true;
    }
}

VB

Private Sub navigationPane1_LocalizeString(sender As Object, e As DevComponents.DotNetBar.LocalizeEventArgs)
    If e.Key = LocalizationKeys.NavBarOptions Then
        e.LocalizedValue = "Optionen"
        e.Handled = True
    ElseIf e.Key = LocalizationKeys.NavBarShowFewerButtons Then
        e.LocalizedValue = "Weniger Oberflächen Anzeigen"
        e.Handled = True
    ElseIf e.Key = LocalizationKeys.NavBarShowMoreButtons Then
        e.LocalizedValue = "Mehr Oberflächen Anzeigen"
        e.Handled = True
    ElseIf e.Key = LocalizationKeys.CustomizeItemAddRemove Then
        e.LocalizedValue = "&Schaltflächen hinzufügen oder entfernen"
        e.Handled = True
    End If
End Sub

Related posts:

  1. How to add any control to menu, toolbar and other DotNetBar controls
  2. Accessing Internal Bar TabStrip Control
  3. How to to change top-most behavior of floating bars
  4. How to set ColorScheme for context menus
  5. Dockable Bar.Text property changes do not appear