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");
}
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);
}
}
The following code snippet shows how you can use the new class:
public Localization()
{
SpreadsheetLocalizationProvider.CurrentProvider = new MySpreadsheetLocalizationProvider();
InitializeComponent();
}
It is necessary to set the SpreadsheetLocalizationProvider. CurrentProvider property before initializing the components.