...
For translating files, the file-extension must be configured accordingly.
Translate text with translate5 language resources .
URL: | /editor/instanttranslateapi |
Available Methods: | GET |
Specialities: | To be able to search for a text, there must be available language resources assigned to a customers of a user |
Availability: | - |
Translate text resource Layout
Name | Type | Info |
text | string | The string to translate. |
source | string | The source language to translate from. Must be valid rfc5646 code. |
target | string | The target language to translate to. Must be valid rfc5646 code. |
Translate a file with translate5 language resources
Please ensure that:
- the filetype is supported (e.g. by Okapi) and
- LanguageResources for the desired language-combination are available (order of their application: first termCollections, second TMs, third MTs).
...
URL | Methods | Parameters | Description |
/editor/instanttranslateapi/filepretranslation | POST | file: multipart/form-data; the file to translate. source: string; the source language to translate from. Must be valid rfc5646 code. target: string; the target language to translate to. Must be valid rfc5646 code. | Step 1: Starts a task-import with the file and its pretranslation. As long as the import is running, the response in step 2 for this file will say "isImporting" instead of returning the download-link. You might need to repeat step 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/filelist | GET | Step 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:
|
Configuration of InstantTranslate
runtimeOptions.LanguageResources.searchCharacterLimit | map | Maximum character per language resource allowed for search. The configuration key is the language resource id, and the value is the character limit. Ex: {{"1": 100},{"2": 300}} | |
runtimeOptions.InstantTranslate.pretranslationTaskLifetimeDays | int | 2 | How many days do you want to keep pretranslated files before the system removes them? |
...