Defines the Localization Service, which is an easy access to operations involving Languages and Dictionary
Namespace: Umbraco.Cms.Core.Services Assembly: Umbraco.Core.dll Syntaxpublic interface ILocalizationService : IService
Methods View Source AddOrUpdateDictionaryValue(IDictionaryItem, ILanguage, String)
Adds or updates a translation for a dictionary item and language
Declarationvoid AddOrUpdateDictionaryValue(IDictionaryItem item, ILanguage language, string value)
Parameters View Source CreateDictionaryItemWithIdentity(String, Nullable<Guid>, String)
Creates and saves a new dictionary item and assigns a value to all languages if defaultValue is specified.
DeclarationIDictionaryItem CreateDictionaryItemWithIdentity(string key, Guid? parentId, string defaultValue = null)
Parameters Type Name Description System.String key System.Nullable<Guid> parentId System.String defaultValue Returns View Source Delete(IDictionaryItem, Int32)
Deletes a IDictionaryItem object and its related translations as well as its children.
Declarationvoid Delete(IDictionaryItem dictionaryItem, int userId = -1)
Parameters Type Name Description IDictionaryItem dictionaryItem
IDictionaryItem to delete
System.Int32 userIdOptional id of the user deleting the dictionary item
View Source Delete(ILanguage, Int32)Deletes a ILanguage by removing it and its usages from the db
Declarationvoid Delete(ILanguage language, int userId = -1)
Parameters Type Name Description ILanguage language
ILanguage to delete
System.Int32 userIdOptional id of the user deleting the language
View Source DictionaryItemExists(String)Checks if a IDictionaryItem with given key exists
Declarationbool DictionaryItemExists(string key)
Parameters Returns Type Description System.Boolean
True if a IDictionaryItem exists, otherwise false
View Source GetAllLanguages()Gets all available languages
DeclarationIEnumerable<ILanguage> GetAllLanguages()
Returns View Source GetAllLanguagesPaged(Int32, Int32) Declaration
virtual PagedModel<ILanguage> GetAllLanguagesPaged(int skip, int take)
Parameters Type Name Description System.Int32 skip System.Int32 take Returns View Source GetDefaultLanguageId()
Gets the default language identifier.
Declarationint? GetDefaultLanguageId()
Returns Type Description System.Nullable<System.Int32> View Source GetDefaultLanguageIsoCode()
Gets the default language ISO code.
Declarationstring GetDefaultLanguageIsoCode()
Returns Type Description System.String View Source GetDictionaryItemById(Guid)
Gets a IDictionaryItem by its id
DeclarationIDictionaryItem GetDictionaryItemById(Guid id)
Parameters Returns View Source GetDictionaryItemById(Int32)
Gets a IDictionaryItem by its System.Int32 id
DeclarationIDictionaryItem GetDictionaryItemById(int id)
Parameters Returns View Source GetDictionaryItemByKey(String)
Gets a IDictionaryItem by its key
DeclarationIDictionaryItem GetDictionaryItemByKey(string key)
Parameters Returns View Source GetDictionaryItemChildren(Guid)
Gets a list of children for a IDictionaryItem
DeclarationIEnumerable<IDictionaryItem> GetDictionaryItemChildren(Guid parentId)
Parameters Type Name Description Guid parentId
Id of the parent
Returns View Source GetDictionaryItemDescendants(Nullable<Guid>)Gets a list of descendants for a IDictionaryItem
DeclarationIEnumerable<IDictionaryItem> GetDictionaryItemDescendants(Guid? parentId)
Parameters Type Name Description System.Nullable<Guid> parentId
Id of the parent, null will return all dictionary items
Returns View Source GetDictionaryItemKeyMap()Gets the full dictionary key map.
DeclarationDictionary<string, Guid> GetDictionaryItemKeyMap()
Returns Type Description Umbraco.Cms.Core.Dictionary<System.String, Guid>
The full dictionary key map.
View Source GetDictionaryItemsByIds(Guid[])Gets a collection of IDictionaryItem by their ids
Declarationvirtual IEnumerable<IDictionaryItem> GetDictionaryItemsByIds(params Guid[] ids)
Parameters Returns View Source GetDictionaryItemsByKeys(String[])
Gets a collection of IDictionaryItem by their keys
Declarationvirtual IEnumerable<IDictionaryItem> GetDictionaryItemsByKeys(params string[] keys)
Parameters Returns View Source GetLanguageById(Int32)
Gets a ILanguage by its id
DeclarationILanguage GetLanguageById(int id)
Parameters Type Name Description System.Int32 id
Id of the ILanguage
Returns View Source GetLanguageByIsoCode(String)Gets a ILanguage by its iso code
DeclarationILanguage GetLanguageByIsoCode(string isoCode)
Parameters Type Name Description System.String isoCode
Iso Code of the language (ie. en-US)
Returns View Source GetLanguageIdByIsoCode(String)Gets a language identifier from its ISO code.
Declarationint? GetLanguageIdByIsoCode(string isoCode)
Parameters Type Name Description System.String isoCode Returns Type Description System.Nullable<System.Int32> View Source GetLanguageIsoCodeById(Int32)
Gets a language ISO code from its identifier.
Declarationstring GetLanguageIsoCodeById(int id)
Parameters Type Name Description System.Int32 id Returns Type Description System.String View Source GetRootDictionaryItems()
Gets the root/top IDictionaryItem objects
DeclarationIEnumerable<IDictionaryItem> GetRootDictionaryItems()
Returns View Source Save(IDictionaryItem, Int32)
Saves a IDictionaryItem object
Declarationvoid Save(IDictionaryItem dictionaryItem, int userId = -1)
Parameters View Source Save(ILanguage, Int32)
Saves a ILanguage object
Declarationvoid Save(ILanguage language, int userId = -1)
Parameters Type Name Description ILanguage language
ILanguage to save
System.Int32 userIdOptional id of the user saving the language
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4