Table of Contents

Class LanguageService

Namespace
Dynamicweb.Ecommerce.International
Assembly
Dynamicweb.Ecommerce.dll
The LanguageService class providing methods for querying and saving the Language Aggregate to and from persistence.
public class LanguageService : ICacheStorage<string, Language>, ICacheStorage<string>, ICacheStorage
Inheritance
LanguageService
Implements
Inherited Members

Methods

CleanDefault()

Sets IsDefault to False for all languages in solution.
public void CleanDefault()

ClearCache()

Resets all keys to the default value for objects stored in the object cache
public void ClearCache()

ClearCache(IEnumerable<string>)

Resets the specified keys to the default value for objects stored in the object cache
public void ClearCache(IEnumerable<string> keys)

Parameters

keys IEnumerable<string>
Keys to reset

ClearCache(string)

Resets the specified key to the default value for objects stored in the object cache
public void ClearCache(string key)

Parameters

key string
Key to reset

Delete(string)

Deletes the language and its relations.
public void Delete(string languageId)

Parameters

languageId string
The language ID.

GetAdminLanguageId()

Gets language id according to admin UI language.
[Obsolete("Use 'Common.Context.GetUiLanguageId' instead")]
public string GetAdminLanguageId()

Returns

string
The language id

Remarks

If there is no country and language for selected UI language, default language id will be returned

GetDefaultLanguage()

public Language GetDefaultLanguage()

Returns

Language

GetDefaultLanguageId()

public string GetDefaultLanguageId()

Returns

string

GetLanguage(string)

Gets the language.
public Language GetLanguage(string languageId)

Parameters

languageId string
The language ID.

Returns

Language
The instance of the Language, or null if the language was not found.

GetLanguages()

Gets all languages in solution.
public IEnumerable<Language> GetLanguages()

Returns

IEnumerable<Language>
The collection of the Language.

Save(Language)

Saves the language.
public Language Save(Language language)

Parameters

language Language
The language.

Returns

Language
The language after save.
To top