TranslationProviderBase
Namespace: Wisej.Ext.Translation
Assembly: Wisej.Ext.Translation
Base class for the translation providers.
- C#
- VB.NET
public class TranslationProviderBase
Public Class TranslationProviderBase
Properties
ClientID
String: The client-id for the provider.
ClientSecret
String: The secret client-key or api-key for the provider.
Methods
Translate(text, from, to)
Invokes the translation service provider and returns the result of the request in an instance of the TranslationResult class.
| Parameter | Type | Description |
|---|---|---|
| text | String | The text to translate. |
| from | String | The source language ("en", "de", ...) or null/empty to ask the provider to autodetect the source language. |
| to | String | The target language ("en", "de", ...) |
Returns: TranslationResult. An instance of TranslationResult.
TranslateAsync(text, from, to, resultCallback)
Invokes the translation service provider asynchronously and returns the result of the request in an instance of the TranslationResult class.
| Parameter | Type | Description |
|---|---|---|
| text | String | The text to translate. |
| from | String | The source language ("en", "de", ...) or null/empty to ask the provider to autodetect the source language. |
| to | String | The target language ("en", "de", ...) |
| resultCallback | Action<TranslationResult> | Callback method that will receive the TranslationResult when ready. |
Inherited By
| Name | Description |
|---|---|
| TranslationProviderYandex | Yandex translation provider. |