Class TranslateTextsParams

  • All Implemented Interfaces:

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