Class DictionaryItemExtensions
Inheritance
System.Object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Core.dll
Syntax
public static class DictionaryItemExtensions
Methods
View SourceAddOrUpdateDictionaryValue(IDictionaryItem, ILanguage, String)
Adds or updates a translation for a dictionary item and language
Declaration
public static void AddOrUpdateDictionaryValue(this IDictionaryItem item, ILanguage language, string value)
Parameters
Type | Name | Description |
---|---|---|
IDictionaryItem | item | |
ILanguage | language | |
System.String | value |
GetTranslatedValue(IDictionaryItem, String)
Returns the translation value for the language ISO code, if no translation is found it returns an empty string
Declaration
public static string GetTranslatedValue(this IDictionaryItem d, string isoCode)
Parameters
Type | Name | Description |
---|---|---|
IDictionaryItem | d | |
System.String | isoCode |
Returns
Type | Description |
---|---|
System.String |