Skip to main content

TranslationProviderBase

Namespace: Wisej.Ext.Translation

Assembly: Wisej.Ext.Translation

Base class for the translation providers.

public class TranslationProviderBase

Properties

Instance memberClientID

String: The client-id for the provider.

Instance memberClientSecret

String: The secret client-key or api-key for the provider.

Methods

Instance memberTranslate(text, from, to)

Invokes the translation service provider and returns the result of the request in an instance of the TranslationResult class.

ParameterTypeDescription
textStringThe text to translate.
fromStringThe source language ("en", "de", ...) or null/empty to ask the provider to autodetect the source language.
toStringThe target language ("en", "de", ...)

Returns: TranslationResult. An instance of TranslationResult.

Instance memberTranslateAsync(text, from, to, resultCallback)

Invokes the translation service provider asynchronously and returns the result of the request in an instance of the TranslationResult class.

ParameterTypeDescription
textStringThe text to translate.
fromStringThe source language ("en", "de", ...) or null/empty to ask the provider to autodetect the source language.
toStringThe target language ("en", "de", ...)
resultCallbackAction<TranslationResult>Callback method that will receive the TranslationResult when ready.

Inherited By

NameDescription
TranslationProviderYandexYandex translation provider.