TranslationProviderYandex
Namespace: Wisej.Ext.Translation
Assembly: Wisej.Ext.Translation
Yandex translation provider.
- C#
- VB.NET
public class TranslationProviderYandex : TranslationProviderBase
Public Class TranslationProviderYandex
Inherits TranslationProviderBase
Constructors
TranslationProviderYandex()
Properties
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 auto detect the source language. |
| to | String | The target language ("en", "de", ...) |
Returns: 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 auto detect the source language. |
| to | String | The target language ("en", "de", ...) |
| resultCallback | Action<TranslationResult> | Callback method that will receive the TranslationResult when ready. |