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

Loads and resolves the XML string table used by Spreadsheet localization.

Definition

Namespace:Telerik.WinForms.Spreadsheet

Assembly:Telerik.WinControls.RadSpreadsheet.dll

Syntax:

C#
public class SpreadsheetLocalizationProvider

Inheritance: objectSpreadsheetLocalizationProvider

Constructors

Creates a provider from the default Spreadsheet string-table resource.

C#
public SpreadsheetLocalizationProvider()

Creates a provider by parsing an XML string table from a stream.

C#
public SpreadsheetLocalizationProvider(Stream input)
Parameters:inputStream

The stream containing the XML string table; it remains owned by the caller.

XML parse failures are suppressed. If the document cannot be loaded, lookups fall back to returning their keys.

Properties

Gets or sets the provider currently used by LocalizationManager.

C#
public static SpreadsheetLocalizationProvider CurrentProvider { get; set; }

Methods

Creates a provider from an XML string table stored in a file.

C#
public static SpreadsheetLocalizationProvider FromFile(string path)
Parameters:pathstring

The path to the XML localization file.

Returns:

SpreadsheetLocalizationProvider

A provider populated from the file.

Creates a provider from an XML string-table resource in the specified assembly.

C#
public static SpreadsheetLocalizationProvider FromResource(string resourceName, Assembly assembly)
Parameters:resourceNamestring

The manifest resource name.

assemblyAssembly

The assembly containing the resource.

Returns:

SpreadsheetLocalizationProvider

A provider populated from the resource.

Exceptions: ArgumentException

The resource is not present in assembly.

Creates a provider from an XML string-table resource in the Spreadsheet assembly.

C#
public static SpreadsheetLocalizationProvider FromResource(string resourceName)
Parameters:resourceNamestring

The manifest resource name.

Returns:

SpreadsheetLocalizationProvider

A provider populated from the resource.

Creates a provider by parsing an XML string table from a stream.

C#
public static SpreadsheetLocalizationProvider FromStream(Stream input)
Parameters:inputStream

The stream containing the XML string table.

Returns:

SpreadsheetLocalizationProvider

A provider populated from the stream when the XML is valid.

The provider reads but does not dispose the supplied stream.

Resolves a localization key from the loaded string table.

C#
public virtual string GetLocalizedString(string id)
Parameters:idstring

The key to resolve.

Returns:

string

The localized value, or id when the key is missing or no table was loaded.