|
Smart Localization
2.3
|
Generic Interface for Automatic Translators More...
Public Member Functions | |
| void | Initialize (InitializeTranslatorEventHandler eventHandler, string cliendID, string clientSecret) |
| Initializes the Automatic Translator More... | |
| void | GetAvailableTranslationLanguages (GetAvailableLanguagesEventHandler eventHandler) |
| Gets all the available languages that can be translated. More... | |
| void | TranslateText (TranslateTextEventHandler eventHandler, string key, string textToTranslate, string languageFrom, string languageTo) |
| Translate a single string More... | |
| void | TranslateTextArray (TranslateTextArrayEventHandler eventHandler, List< string > keys, List< string > textsToTranslate, string languageFrom, string languageTo) |
| Translate an array of texts to a specific language. Note: the event handler can be called multiple times if splitting of the array is necessary More... | |
Properties | |
| bool | IsInitializing [get] |
| Returns if the Automatic Translator is currently in the process of initializing More... | |
| bool | IsInitialized [get] |
| Returns if the Automatic Translator is initialized More... | |
| bool | InitializationDidExpire [get] |
| Returns if the Translator is not Initialized anymore due to an expiration of an access token More... | |
Generic Interface for Automatic Translators
| void SmartLocalization.Editor.IAutomaticTranslator.GetAvailableTranslationLanguages | ( | GetAvailableLanguagesEventHandler | eventHandler | ) |
Gets all the available languages that can be translated.
| eventHandler | Event handler returning the success/failure along with a list of available languages |
Implemented in SmartLocalization.Editor.MicrosoftAutomaticTranslator.
| void SmartLocalization.Editor.IAutomaticTranslator.Initialize | ( | InitializeTranslatorEventHandler | eventHandler, |
| string | cliendID, | ||
| string | clientSecret | ||
| ) |
Initializes the Automatic Translator
| eventHandler | The Event handler returning success/failure of the operation |
| cliendID | The client API ID |
| clientSecret | The client API Secret |
Implemented in SmartLocalization.Editor.MicrosoftAutomaticTranslator.
| void SmartLocalization.Editor.IAutomaticTranslator.TranslateText | ( | TranslateTextEventHandler | eventHandler, |
| string | key, | ||
| string | textToTranslate, | ||
| string | languageFrom, | ||
| string | languageTo | ||
| ) |
Translate a single string
| eventHandler | The event handler returning the translated value |
| key | The key used for identification |
| textToTranslate | The text to translate |
| languageFrom | The language code to translate from |
| languageTo | The language code to translate to |
Implemented in SmartLocalization.Editor.MicrosoftAutomaticTranslator.
| void SmartLocalization.Editor.IAutomaticTranslator.TranslateTextArray | ( | TranslateTextArrayEventHandler | eventHandler, |
| List< string > | keys, | ||
| List< string > | textsToTranslate, | ||
| string | languageFrom, | ||
| string | languageTo | ||
| ) |
Translate an array of texts to a specific language. Note: the event handler can be called multiple times if splitting of the array is necessary
| eventHandler | The event handler returning the translated values. Can be called multiple times. |
| keys | A list of keys used for identification. Make sure the indices correspond with the list of translated values. |
| textsToTranslate | A list of strings to translate. Make sure the indices correspond with the list of keys. |
| languageFrom | The language code to translate from |
| languageTo | The language code to translate to |
Implemented in SmartLocalization.Editor.MicrosoftAutomaticTranslator.
|
get |
Returns if the Translator is not Initialized anymore due to an expiration of an access token
|
get |
Returns if the Automatic Translator is initialized
|
get |
Returns if the Automatic Translator is currently in the process of initializing