Class TranslateMessagesParams

  • All Implemented Interfaces:

    
    public final class TranslateMessagesParams
    
                        

    Translate message parameters.

    Used for Batch Translate message request Parameter, Contains Message list, Whether force re- New translation and Translation mode.

    Usage Example:

    val params = TranslateMessagesParams(
        listOf(
            TranslateMessageParam("messageId1"),
            TranslateMessageParam("messageId2").apply {
                targetLanguage = "en"
            }
        )
    ).apply {
        force = true
        mode = TranslateMode.INTELLIGENT
    }
    NCEngine.translate.translateMessages(params) { error ->
        if (error == null) {
            }
        }
    }

    Default is false.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Boolean getForce() Whether to force re-translate even if a translation already exists.
      final Unit setForce(Boolean force) Whether to force re-translate even if a translation already exists.
      final TranslateMode getMode() Translation mode.
      final Unit setMode(TranslateMode mode) Translation mode.
      final List<TranslateMessageParam> getList()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait