Previous Docs Version

The documentation you are viewing is for a previous version of the Vendr product. Click here to jump to the current stable version.

ITranslationService

API reference for ITranslationService in Vendr, the eCommerce solution for Umbraco v8+

ITranslationService

Defines the Vendr Translation service

public interface ITranslationService

Namespace

Methods

TranslateValue (1 of 2)

Translates a value to the given language

public object TranslateValue(object value, string languageIsoCode)

Parameters

Parameter Description
value
The value to attempt to translate
languageIsoCode
The ISO Code of the language to attempt to translate to

Returns

The translated value, or the original value if a translation was unsuccessful


TranslateValue (2 of 2)

Translates a value to the given language

public object TranslateValue(object value, string languageIsoCode, out string usedLanguageIsoCode)

Parameters

Parameter Description
value
The value to attempt to translate
languageIsoCode
The ISO Code of the language to attempt to translate to
usedLanguageIsoCode
The ISO Code of the language that was used for the translation as it could differ from the requested language if a fallback language is in place

Returns

The translated value, or the original value if a translation was unsuccessful


TranslateValues (1 of 2)

Translates a series of values to the given language

public IEnumerable<object> TranslateValues(IEnumerable<object> values, string languageIsoCode)

Parameters

Parameter Description
values
The values to attempt to translate
languageIsoCode
The ISO Code of the language to attempt to translate to

Returns

A list of translated value, or the original value if a translation was unsuccessful


TranslateValues (2 of 2)

Translate a series of dictionary values to the given language

public IDictionary<string, object> TranslateValues(
    IEnumerable<KeyValuePair<string, object>> values, string languageIsoCode)

Parameters

Parameter Description
values
The values to attempt to translate
languageIsoCode
The ISO Code of the language to attempt to translate to

Returns

A dictionary of translated values, or the original value if a translation was unsuccessful

Edit this page on GitHub

Site + logo design © 2024 Outfield Digital Ltd. Content contributions licensed under MIT.
Vendr® is a Registered Trademark of Outfield Digital Ltd.