Translation
Wisej.Ext.Translation.Translation
Namespace: Wisej.Ext.Translation
Assembly: Wisej.Ext.Translation (3.2.0.0)
The Translation component interfaces with several third party translation providers to provide language translation services to the application.
Constructors
Initializes a new instance of the Translation class.
Initializes a new instance of the Translation class together with the specified container.
Name | Type | Description |
---|---|---|
container | A IContainer that represents the container for the component. |
Properties
String: The client-id for the provider.
String: The secret client-key or api-key for the provider.
TranslationProviderBase: Returns or sets the translation provider implementation.
String: Returns or sets the type of the translation provider.
Methods
Translates the text to the requested language.
Parameter | Type | Description |
---|---|---|
text | The text to translate. | |
from | The source language ("en", "de", ...) or null/empty to ask the provider to autodetect the source language. | |
to | The target language ("en", "de", ...) |
Returns: TranslationResult.
Invokes the translation service provider asynchronously and returns the result of the request in an instance of the TranslationResult class.
Parameter | Type | Description |
---|---|---|
text | The text to translate. | |
from | The source language ("en", "de", ...) or null/empty to ask the provider to auto detect the source language. | |
to | The target language ("en", "de", ...) | |
resultCallback | Callback method that will receive the TranslationResult when ready. |
Last updated