Skip to main content

Translate

AndroidiOSPC

If you are using the Unity engine, see Translate in the Unity SDK.

For translation, refer to FINTLTranslatorLang for the supported language list.

Function definition​

UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static void Translate(FINTLTranslatorReq req_info);

Parameter Instructions​

ParametersTypeExplanation
req_infoFINTLTranslatorReqTranslation request information, see TranslatorReq for details.

Observers​

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

Callback ID is kMethodIDTranslatorTranslate.

Code example​

FINTLTranslatorReq req_info;
FINTLTranslatorLang translate_lang;
req_info.targetLang = translate_lang.en;
req_info.translateTexts = TEXT("[\"xxx\", \"xxx\"]");
// Business Project Code, please contact your business Admin for details, incorrect usage will result in error.
req_info.gameCode = "";
// Unique request ID for tracking purposes
req_info.traceId = "";
// Initiate a translation request
UINTLSDKAPI::Translate(req_info);