TranslateTextsParams

public final class TranslateTextsParams

Translate text parameters.

Used for Batch translation Custom Text request Parameter, Contains Text List and Translation mode.

Usage Example:

val params = TranslateTextsParams(
listOf(
TranslateTextParam("Hello, world!"),
TranslateTextParam("How are you?").apply {
targetLanguage = "zh"
}
)
).apply {
mode = TranslateMode.INTELLIGENT
}
NCEngine.translate.translateTexts(params) { error ->
if (error == null) {
}
}
}

Default is TranslateMode.MECHANICAL (Mechanical translation).

Constructors

Link copied to clipboard

Properties

Link copied to clipboard

翻译模式。

Link copied to clipboard
private final List<TranslateTextParam> texts

Functions

Link copied to clipboard
public final TranslateMode getMode()

翻译模式。

Link copied to clipboard
public final List<TranslateTextParam> getTexts()
Link copied to clipboard
public final Unit setMode(TranslateMode mode)

翻译模式。