Class MemoryLocalizationService
A memory based implementation of Localization
Inherited Members
Namespace: EPiServer.Framework.Localization
Assembly: EPiServer.Framework.dll
Version: 12.0.3Syntax
public class MemoryLocalizationService : LocalizationService
Constructors
MemoryLocalizationService()
Initializes a new instance of the Memory
Declaration
public MemoryLocalizationService()
MemoryLocalizationService(ResourceKeyHandler)
Initializes a new instance of the Memory
Declaration
public MemoryLocalizationService(ResourceKeyHandler keyHandler)
Parameters
Type | Name | Description |
---|---|---|
Resource |
keyHandler | The handler used to manipulate resource keys. |
Properties
AvailableLocalizations
Gets all available localizations that the Localization
Declaration
public override IEnumerable<CultureInfo> AvailableLocalizations { get; }
Property Value
Type | Description |
---|---|
System. |
Overrides
Methods
AddString(CultureInfo, String, String)
Adds a string to the Memory
Declaration
public void AddString(CultureInfo culture, string resourceKey, string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
culture | The culture that the string should be associated with. |
System. |
resourceKey | The key that the string should be associated with. |
System. |
value | The string value. |
ClearStrings()
Removes all strings from the Memory
Declaration
public void ClearStrings()
ClearStrings(CultureInfo)
Removes all strings from the Memory
Declaration
public void ClearStrings(CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System. |
culture | The culture to clear all strings from. |
GetAllStringsByCulture(String, String[], CultureInfo)
Gets all localized strings for the specified culture below the specified key.
Declaration
protected override IEnumerable<ResourceItem> GetAllStringsByCulture(string originalKey, string[] normalizedKey, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System. |
originalKey | The original key that was passed into any GetString method. |
System. |
normalizedKey | The |
System. |
culture | The requested culture for the localized strings. |
Returns
Type | Description |
---|---|
System. |
All localized strings below the specified key. |
Overrides
See Also
LoadString(String[], String, CultureInfo)
Gets the localized string for the specified key in the specified culture.
Declaration
protected override string LoadString(string[] normalizedKey, string originalKey, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System. |
normalizedKey | The |
System. |
originalKey | The original key that was passed into any GetString method. |
System. |
culture | The requested culture for the localized string. |
Returns
Type | Description |
---|---|
System. |
A localized string or |
Overrides
See Also
RemoveString(CultureInfo, String)
Removes a string from the Memory
Declaration
public void RemoveString(CultureInfo culture, string resourceKey)
Parameters
Type | Name | Description |
---|---|---|
System. |
culture | The culture that the string is associated with. |
System. |
resourceKey | The key that the string is associated with. |