Class LocalizationProvider
Provides the base class for creating a provider to handle localized resources.
Namespace: EPiServer.Framework.Localization
Assembly: EPiServer.Framework.dll
Version: 10.10.4Syntax
public abstract class LocalizationProvider : ProviderBase
Constructors
LocalizationProvider()
Declaration
protected LocalizationProvider()
Properties
AvailableLanguages
Gets all available languages. An available language does not need to contain any translations.
Declaration
public abstract IEnumerable<CultureInfo> AvailableLanguages { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Globalization.CultureInfo> |
Methods
GetAllStrings(String, String[], CultureInfo)
Gets all localized strings for a specific culture. Will return all strings below the specified key.
Declaration
public abstract IEnumerable<ResourceItem> GetAllStrings(string originalKey, string[] normalizedKey, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.String | originalKey | The unmodified key |
System.String[] | normalizedKey | The |
System.Globalization.CultureInfo | culture | The requested culture for the resource string |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ResourceItem> | All resource strings below the specified key |
GetString(String, String[], CultureInfo)
Gets a localized string from a resource key.
Declaration
public abstract string GetString(string originalKey, string[] normalizedKey, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.String | originalKey | The unmodified key |
System.String[] | normalizedKey | The |
System.Globalization.CultureInfo | culture | The requested culture for the resource string |
Returns
Type | Description |
---|---|
System.String | A translated resource string |