New to Telerik UI for WinFormsStart a free 30-day trial

Localization

Updated over 6 months ago

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:

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

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.

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

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

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

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

Not finding the help you need?
Contact Support