Skip to main content

Translate

AndroidiOSWindows
If you are using the Unity engine, refer to the Unity SDK's Translate.

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 administrator for details, incorrect usage will result in error.
req_info.GameCode = "";
// Unique request ID for tracking purposes
req_info.traceId = "";
// Initiate a translation request; login status required for invocation
UINTLSDKAPI::Translate(req_info);