目录

class info
com.huawei.hms.mlsdk.translate.cloud.MLRemoteTranslateSetting.Factory
Creates a text translation configurator instance.

Public Constructor Summary

Constructor name
Factory()
Creates a factory instance of the text translation configurator.

Public Method Summary

Return typeMethod name
mlsdk.translate.cloud.MLRemoteTranslateSettingcreate()
mlsdk.translate.cloud.MLRemoteTranslateSetting.FactorysetSourceLangCode(String sourceLangCode)
mlsdk.translate.cloud.MLRemoteTranslateSetting.FactorysetSourceLangCode(String sourceLangCode)

Public Constructors

Method
public Factory()
Creates a factory instance of the text translation configurator.

Public Methods

Method
public mlsdk.translate.cloud.MLRemoteTranslateSetting create()
Creates a text translator instance.

Return

Typedesc
mlsdk.translate.cloud.MLRemoteTranslateSettingReturns a text translator instance.
Method
public mlsdk.translate.cloud.MLRemoteTranslateSetting.Factory setSourceLangCode(String sourceLangCode)
Sets the source language code (ISO 639-1 standard code).

Parameters

Parameter nameParameter desc
sourceLangCode

Source language code (ISO 639-1 standard code).

If this parameter is not set, the system automatically recognizes the language of the text to be translated.

Return

Typedesc
mlsdk.translate.cloud.MLRemoteTranslateSetting.FactoryReturns a text translation configurator instance.
Method
public mlsdk.translate.cloud.MLRemoteTranslateSetting.Factory setTargetLangCode(String targetLangCode)
Sets the target language code (ISO 639-1 standard code).

Parameters

Parameter nameParameter desc
targetLangCodeTarget language code (ISO 639-1 standard code).

Return

Typedesc
mlsdk.translate.cloud.MLRemoteTranslateSetting.FactoryReturns a text translation configurator instance.