Response.results

Note:

The content in this help topic pertains to SuiteScript 2.1.

Property Description

The translation documents.

This property is an array of machineTranslation.Document objects, each of which represents a translated document.

Type

machineTranslation.Document[]

Supported Script Types

Server scripts

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

Module

N/machineTranslation Module

Parent Object

machineTranslation.Response

Sibling Object Members

Response Object Members

Since

2025.1

Errors

Error Code

Thrown If

READ_ONLY

Setting the property is attempted.

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

// Work with the result
const resultText = translationResults.results[0].text;

...
// Add additional code 

          

General Notices