New to Telerik UI for WinForms? Download free 30-day trial

Localization

To change the default English localization provider you should use the CurrentProvider static property of the SpreadsheetLocalizationProvider class. For example, you can load the string from a XML file like this:

public void FileProvider()
{
    SpreadsheetLocalizationProvider.CurrentProvider = SpreadsheetLocalizationProvider.FromFile(@"C:\SpreadSheedStringsFile");
}

Public Sub FileProvider()
    SpreadsheetLocalizationProvider.CurrentProvider = SpreadsheetLocalizationProvider.FromFile("C:\SpreadSheedStringsFile")
End Sub

You can download a XML file that contains all the currently used strings from here: Strings file

SpreadsheetLocalizationProvider contains all strings related to the RadSpreadsheetRibbonBar as well.

Another approach is to create a custom localization provider class which inherits SpreadsheetLocalizationProvider. In it you should just override the GetLocalizedString method and return the localized string depending on current id.

public class MySpreadsheetLocalizationProvider : SpreadsheetLocalizationProvider
{
    public override string GetLocalizedString(string id)
    {
        switch (id)
        {
            //----------------------
            case "Spreadsheet_Workbook":
                return "Spreadsheet Workbook";
           //----------------------
        }
        return base.GetLocalizedString(id);
    }
}

Public Class MySpreadsheetLocalizationProvider
    Inherits SpreadsheetLocalizationProvider
    Public Overrides Function GetLocalizedString(ByVal id As String) As String
        Select Case id
                '----------------------
            Case "Spreadsheet_Workbook"
                Return "Spreadsheet Workbook"
                '----------------------
        End Select
        Return MyBase.GetLocalizedString(id)
    End Function
End Class

The following code snippet shows how you can use the new class:

public Localization()
{
    SpreadsheetLocalizationProvider.CurrentProvider = new MySpreadsheetLocalizationProvider();
    InitializeComponent();
}

Public Sub New()
    SpreadsheetLocalizationProvider.CurrentProvider = New MySpreadsheetLocalizationProvider()
    InitializeComponent()
End Sub

It is necessary to set the SpreadsheetLocalizationProvider. CurrentProvider property before initializing the components.

In this article