TranslateTextsParams

public final class TranslateTextsParams

Parameters for batch text translation.

Contains a list of texts and a translation mode for batch translation requests.

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) {
}
}
}

Parameters

list

List of text items to translate.

Constructors

Properties

Link copied to clipboard
private final List<TranslateTextParam> list
Link copied to clipboard

Translation mode.

Functions

Link copied to clipboard
public final List<TranslateTextParam> getList()
Link copied to clipboard
public final TranslateMode getMode()

Translation mode.

Link copied to clipboard
public final Unit setMode(TranslateMode mode)

Translation mode.