Skip to main content

Translate

AndroidiOS
If you were looking for the method for use with Unreal Engine, see Translate for Unreal Engine SDK.

Translate, see TranslatorLang for a list of supported languages.

Function definition

public static void Translate(INTLTranslatorReq req_info);

Input parameters

ParameterTypeDescription
req_infoINTLTranslatorReqTranslate request info, see INTLTransltorReq

Observers

The callback processing interface is TranslatorResultObserver. The callback data structure is TranslatorResult.

The callback methodID is INTL_TRANSLATOR_TRANSLATE.

Code sample

TranslatorLang contains the languages supported, see TranslatorLang.

INTLTranslatorReq translatorReq.SrcLang = new INTLTranslatorReq();
translatorReq.SrcLang = TranslatorLang.auto_lang;
translatorReq.TargetLang = TranslatorLang.en;
translatorReq.TranslateTexts = "[\"xxx\", \"xxx\"]";
// Translate request, need login first
INTLAPI.Translate(translatorReq);