Smart Localization  2.3
SmartLocalization.Editor.IAutomaticTranslator Interface Reference

Generic Interface for Automatic Translators More...

Inheritance diagram for SmartLocalization.Editor.IAutomaticTranslator:
SmartLocalization.Editor.MicrosoftAutomaticTranslator

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...
 

Detailed Description

Generic Interface for Automatic Translators

Member Function Documentation

void SmartLocalization.Editor.IAutomaticTranslator.GetAvailableTranslationLanguages ( GetAvailableLanguagesEventHandler  eventHandler)

Gets all the available languages that can be translated.

Parameters
eventHandlerEvent 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

Parameters
eventHandlerThe Event handler returning success/failure of the operation
cliendIDThe client API ID
clientSecretThe 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

Parameters
eventHandlerThe event handler returning the translated value
keyThe key used for identification
textToTranslateThe text to translate
languageFromThe language code to translate from
languageToThe 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

Parameters
eventHandlerThe event handler returning the translated values. Can be called multiple times.
keysA list of keys used for identification. Make sure the indices correspond with the list of translated values.
textsToTranslateA list of strings to translate. Make sure the indices correspond with the list of keys.
languageFromThe language code to translate from
languageToThe language code to translate to

Implemented in SmartLocalization.Editor.MicrosoftAutomaticTranslator.

Property Documentation

bool SmartLocalization.Editor.IAutomaticTranslator.InitializationDidExpire
get

Returns if the Translator is not Initialized anymore due to an expiration of an access token

bool SmartLocalization.Editor.IAutomaticTranslator.IsInitialized
get

Returns if the Automatic Translator is initialized

bool SmartLocalization.Editor.IAutomaticTranslator.IsInitializing
get

Returns if the Automatic Translator is currently in the process of initializing


The documentation for this interface was generated from the following file: