Translate Document

Go to Product

Upload and Translate a Document

This call uploads a document and queues it for translation. The call returns once the upload is complete, returning a document ID and key which can be used to query the translation status and to download the translated document once translation is complete.

Because the request includes a file upload, it must be an HTTP POST request with content type multipart/form-data.

Please be aware that the uploaded document is automatically removed from the server once the translated document has been downloaded. You have to upload the document again in order to restart the translation.

The maximum upload limit for documents is available here and may vary based on API plan and document type.

You may specify the glossary to use for the document translation using the glossary_id parameter. Important: This requires the source_lang parameter to be set and the language pair of the glossary has to match the language pair of the request.

Options

Source Language (*)

Language of the text to be translated. Options currently available:

  • BG - Bulgarian
  • CS - Czech
  • DA - Danish
  • DE - German
  • EL - Greek
  • EN - English
  • ES - Spanish
  • ET - Estonian
  • FI - Finnish
  • FR - French
  • HU - Hungarian
  • ID - Indonesian
  • IT - Italian
  • JA - Japanese
  • KO - Korean
  • LT - Lithuanian
  • LV - Latvian
  • NB - Norwegian (Bokmål)
  • NL - Dutch
  • PL - Polish
  • PT - Portuguese (all Portuguese varieties mixed)
  • RO - Romanian
  • RU - Russian
  • SK - Slovak
  • SL - Slovenian
  • SV - Swedish
  • TR - Turkish
  • UK - Ukrainian
  • ZH - Chinese

If this parameter is omitted, the API will attempt to detect the language of the text and translate it.

Target Language

The language into which the text should be translated. Options currently available:

  • BG - Bulgarian
  • CS - Czech
  • DA - Danish
  • DE - German
  • EL - Greek
  • EN - English (unspecified variant for backward compatibility; please select EN-GB or EN-US instead)
  • EN-GB - English (British)
  • EN-US - English (American)
  • ES - Spanish
  • ET - Estonian
  • FI - Finnish
  • FR - French
  • HU - Hungarian
  • ID - Indonesian
  • IT - Italian
  • JA - Japanese
  • KO - Korean
  • LT - Lithuanian
  • LV - Latvian
  • NB - Norwegian (Bokmål)
  • NL - Dutch
  • PL - Polish
  • PT - Portuguese (unspecified variant for backward compatibility; please select PT-BR or PT-PT instead)
  • PT-BR - Portuguese (Brazilian)
  • PT-PT - Portuguese (all Portuguese varieties excluding Brazilian Portuguese)
  • RO - Romanian
  • RU - Russian
  • SK - Slovak
  • SL - Slovenian
  • SV - Swedish
  • TR - Turkish
  • UK - Ukrainian
  • ZH - Chinese (unspecified variant for backward compatibility; please select ZH-HANS instead)
  • ZH-HANS - Chinese (simplified)
File

The document file to be translated. The file name should be included in this part's content disposition. As an alternative, the filename parameter can be used. The following file types and extensions are supported:

  • docx - Microsoft Word Document
  • pptx - Microsoft PowerPoint Document
  • xlsx - Microsoft Excel Document
  • pdf - Portable Document Format
  • htm / html - HTML Document
  • txt - Plain Text Document
  • xlf / xliff - XLIFF Document, version 2.1
  • srt - SRT Document
Filename (*)
The name of the uploaded file. Can be used as an alternative to including the file name in the file part's content disposition.
Output Format (*)

File extension of desired format of translated file, for example: docx. If unspecified, by default the translated file will be in the same format as the input file.

Note: Not all combinations of input file and translation file extensions are permitted. See Document Format Conversions for the permitted combinations.

Formality (*)

Sets whether the translated text should lean towards formal or informal language. This feature currently only works for target languages DE (German), FR (French), IT (Italian), ES (Spanish), NL (Dutch), PL (Polish), PT-BR and PT-PT (Portuguese), JA (Japanese), and RU (Russian). Learn more about the plain/polite feature for Japanese here. Setting this parameter with a target language that does not support formality will fail, unless one of the prefer_... options are used. Possible options are:

  • default (default)
  • more - for a more formal language
  • less - for a more informal language
  • prefer_more - for a more formal language if available, otherwise fallback to default formality
  • prefer_less - for a more informal language if available, otherwise fallback to default formality
Glossary ID (*)
A unique ID assigned to a glossary.
Result Format

Specify how the response should be mapped to the table output. The following formats are available:

Structured Table: Returns a parsed table with data split into rows and columns.

  • Document ID: A unique ID assigned to the uploaded document and the translation process. Must be used when referring to this particular document in subsequent API requests.
  • Document Key: A unique key that is used to encrypt the uploaded document as well as the resulting translation on the server side. Must be provided with every subsequent API request regarding this particular document.

Raw Response: Returns the raw response in a single row with the following columns:

  • body: Response body
  • status: HTTP status code

Input Ports

Icon
Configuration data.

Output Ports

Icon
Result of the request depending on the selected Result Format.
Icon
Configuration data (this is the same as the input port; it is provided as passthrough for sequentially chaining nodes to declutter your workflow connections).

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

  • No workflows found

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.