Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • the filetype is supported (e.g. by Okapi) ,TermTagger is running,and
  • LanguageResources for the desired language-combination are available (order of their application: first termCollections, second TMs, third MTs).

Translating files can take a while.

URLMethodsParametersDescription

/editor/instanttranslateapi/

fileprepare

filepretranslation

POST
fil

file: multipart/form-data; the file to translate.

source: string; the source language to translate from. Must be valid rfc5646 code.

When no domainCode is provided this is mandatory.

target: string; the target language to translate to. Must be valid rfc5646 code

. When no domanCode is provided this is mandatory

.

domainCode string Unique sdl language cloud engine id(domainCode).

Step 1:

Prepare

Starts a task

for

-import

of

with the file and

run the pretranslation.

Response (example): {"taskId":"539"}

/editor/instanttranslateapi/fileimportGET

taskId: int; the taskId given in the repsonse of step 1

Step 2: Run the import of the task with the

its pretranslation.

As long as the import is running, the response in step

3

2 for this file will say "isImporting" instead of returning the download-link. You might need to repeat step

3

2 until you get the link.

The translated files are available until their configured lifetime is over; then they will be removed automatically.

Response (example): {"taskId":"539"}

/editor/instanttranslateapi/filelistGET

Step

3

2: Get a list of all pretranslations that are currently available for the InstantTranslate-user including their downloadUrl.

Response: allPretranslatedFiles with the data for each pretranslation-file:

  • array[taskId] = array(taskName, downloadUrl, removeDate)
  • downloadUrl: 'isImporting' | 'isErroneous' | 'isNotPretranslated' | url (the url starts a common task-export; the translated file is included in the exported ZIP)


Configuration of InstantTranslate

...