machineTranslation.Response

Note:

The content in this help topic pertains to SuiteScript 2.1.

Object Description

A response returned from machineTranslation.translate(options).

A response represents the translation results from the translation service. This object includes properties for the translated documents (Response.results) and any errors that occurred during translation (Response.errors). If no errors occurred, the Response.errors property is empty.

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Module

N/machineTranslation Module

Methods and Properties

Response Object Members

Since

2025.1

Syntax

Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/machineTranslation Module Script Samples.

            // Add additional code
...

const myDocument = machineTranslation.createDocument({
    id: 'myDoc',
    text: 'This is a document to be translated.'
});

const translationResults = machineTranslation.translate({
    documents: [myDocument],
    targetLanguage: machineTranslation.Language.CZECH
});

...
// Add additional code 

          

Related Topics

General Notices