Third-party user-ready API capable of performing fast, high-quality pure HALOS translations. It is the gateway and interface to expose our HALOS technology to external consumers interested in utilizing purely machine-enabled translation.
Quotas: Each HALOS is limited to 6000 request per minute
Translate API offers the following licenses.
Postman is a tool that allows you to test and document APIs. It allows you to send various types of HTTP requests to a server and see the response.
To facilitate your integration efforts and allow you to try out Translate API, we provide an API collection file for Postman, which contains examples for the Translate API endpoints and their usage.
Lengoo - Translate API
then the Variables
tab.CLIENT_ID
add the "client id" provided by Lengoo into the Current Value column.CLIENT_SECRET
add the "client secret" provided by Lengoo into the Current Value column.💾 Save
button.Authorization
tab, scroll down and click Get New Access Token
which will then be confirmed by a pop-up.Use Token
.Language Resources
folder then the request named Detect Languages
.Send
in order to send the HTTP request.Returns customer's available language resources.
Types of language resources:
{- "resources": [
- {
- "id": "1fe203ea-bcee-4899-be12-63e3697dc0e7",
- "name": "Machine Learning Engineering",
- "type": "MachineTranslation",
- "is_generic": true,
- "languages": {
- "en": [
- "de",
- "es"
], - "de": [
- "en",
- "es"
]
}
}, - {
- "id": "c1d834ba-cb93-4de2-8aba-b00d83379dd3",
- "name": "Translation Memory Sales",
- "type": "TranslationMemory",
- "is_generic": false,
- "languages": {
- "en": [
- "de",
- "es"
], - "de": [
- "en",
- "es"
]
}
}, - {
- "id": "fba30f8d-3226-46c2-8e76-000583b12db8",
- "name": "Translation Bank Marketing",
- "type": "TermBank",
- "is_generic": true,
- "languages": {
- "en": [
- "de",
- "es"
], - "de": [
- "en",
- "es"
]
}
}
]
}
Detects languages of an array of text and returns the language and score
The request is an array of text and should not have more than 20 elements. The text content in the request body cannot exceed 10,000 characters.
Translate Text
texts required | Array of strings <= 10000 characters [ 1 .. 20 ] items |
{- "texts": [
- "This is awesome"
]
}
{- "detectedLanguages": [
- {
- "language": "en-US",
- "score": 0.789665937423706
}
]
}
Translate text by given sourceLanguage and targetLanguage combination.
The languageResources parameter is optional. If it is not sent, the default customer translation resources will be applied.
With this parameter, the requester can decide which translation resource will be used for translation. The translation algorithm will try to translate in order of languageResources item.
For example, if the languageResources: ["id-of-MachineTranslation-langugage-resource", ""id-of-TranslationMemory-langugage-resource""] is sent like this, the algorithm will run first MachineTranslation for translation. If MachineTranslation can translate the text, then it returns the translations. If it is not then it will search on TranslationMemory to translate the text.
We recommend that the text should be less than or equal to 5000 characters.
The character type is UTF-8 encoded unicode code points.
Payload should be a maximum of 30 kilobytes.
The returned translations array will be in the same order as the provided array.
Translate Text
texts | Array of strings [ 1 .. 32 ] items [ items [ 1 .. 5000 ] characters ] Texts to be translated |
sourceLanguage required | string </^[a-z]{2}\-[A-Z]{2}$/g> (languageCode) Language code using ISO 639-1 for language and ISO 3166-1 alpha-2 for country. |
targetLanguage required | string </^[a-z]{2}\-[A-Z]{2}$/g> (languageCode) Language code using ISO 639-1 for language and ISO 3166-1 alpha-2 for country. |
languageResources | Array of strings <uuid> (UUID) non-empty IDs of the language resources to be used |
includeTranslationInfo | boolean Request additional information regarding the translation |
tagStrategy | string Enum: "split" "retag" "mixed" Sets the strategy for tag transfer into the target sentence. retag applies a predictive retagging model. split splits the segment on tags, translates the text parts seperately, and puts the segment together in order while mixed strategy is used to distinguish some boundary tags from inline tags (e.g. bold, italics, links) and combines both retag and split methods |
termHighlight | boolean This shows the highlight with tags of the populated termbank (Translation Bank Marketing) matches for easy identification. |
{- "texts": [
- "Hello world!",
- "How are you?"
], - "sourceLanguage": "en-US",
- "targetLanguage": "de-DE",
- "languageResources": [
- "cb26237c-3beb-40f3-8e13-77d862f722b5"
], - "includeTranslationInfo": true,
- "tagStrategy": "split",
- "termHighlight": true
}
{- "translations": [
- {
- "translation": "Hallo <halos-tb id='423e75c256436cf1b68ba5e653a3874c'><halos-tb id='423e75c256436cf1b68ba5e653a3874c'>Welt</halos-tb></halos-tb>!",
- "translationInfo": [
- {
- "sourceSegment": "Hello world!",
- "targetSegment": [
- {
- "content": "Hallo <halos-tb id='423e75c256436cf1b68ba5e653a3874c'><halos-tb id='423e75c256436cf1b68ba5e653a3874c'>Welt</halos-tb></halos-tb>!",
- "sourceSegment": "Hello world!",
- "translatedBy": {
- "id": "cb26237c-3beb-40f3-8e13-77d862f722b5",
- "name": "Test-123",
- "type": "MachineTranslation",
- "score": 0.6217623180360736
}
}
]
}
]
}, - {
- "translation": "Wie geht es Ihnen?",
- "translationInfo": [
- {
- "sourceSegment": "How are you?",
- "targetSegment": [
- {
- "content": "Wie geht es Ihnen?",
- "sourceSegment": "How are you?",
- "translatedBy": {
- "id": "cb26237c-3beb-40f3-8e13-77d862f722b5",
- "name": "Test-123",
- "type": "MachineTranslation",
- "score": 0.7550811893135542
}
}
]
}
]
}
]
}
Utilize this to translate a larger amount of texts asynchronously.
Translate text by given sourceLanguage and targetLanguage combination.
The languageResources parameter is optional. If it is not sent, the default customer translation resources will be applied.
With this parameter, the requester can decide which translation resource will be used for translation. The translation algorithm will try to translate in order of languageResources item.
For example, if the languageResources: ["id-of-MachineTranslation-langugage-resource", ""id-of-TranslationMemory-langugage-resource""] is sent like this, the algorithm will run first MachineTranslation for translation. If MachineTranslation can translate the text, then it returns the translations. If it is not then it will search on TranslationMemory to translate the text.
The returned translations array will be in the same order as the provided array.
Bulk Translation input
texts | Array of strings [ 1 .. 500 ] items [ items [ 1 .. 30000 ] characters ] Text to be translated |
sourceLanguage required | string </^[a-z]{2}\-[A-Z]{2}$/g> (languageCode) Language code using ISO 639-1 for language and ISO 3166-1 alpha-2 for country. |
targetLanguage required | string </^[a-z]{2}\-[A-Z]{2}$/g> (languageCode) Language code using ISO 639-1 for language and ISO 3166-1 alpha-2 for country. |
languageResources | Array of strings <uuid> (UUID) non-empty IDs of the language resources to be used |
referenceId | string (referenceId) [ 1 .. 50 ] characters Optional field where you can add a reference identifier string |
includeTranslationInfo | boolean Request additional information regarding the translation |
termHighlight | boolean This shows the highlight with tags of the populated termbank (Translation Bank Marketing) matches for easy identification. |
{- "texts": [
- "Hello world! How are you?",
- "Where is the library?"
], - "sourceLanguage": "en-US",
- "targetLanguage": "de-DE",
- "languageResources": [
- "cb26237c-3beb-40f3-8e13-77d862f722b5"
], - "referenceId": "10c73ddb-fae1-46c9-851d-40e364b121a5",
- "includeTranslationInfo": true,
- "termHighlight": true
}
{- "jobId": "cb26237c-3beb-40f3-8e13-77d862f722b5"
}
Retrieve Translation Job:
If the translation job status is “active” only the status of the job will be returned.
If the translation job status is “failed” we will return the status and an array containing the errors.
If the translation job is "completed" all translation will be returned as specified in the response schema.
id required | string <uuid> ID of the Job |
{- "status": "active",
- "referenceId": "10c73ddb-fae1-46c9-851d-40e364b121a5",
- "translations": [
- {
- "translation": "Hallo Welt!",
- "translationInfo": [
- {
- "sourceSegment": "Hello world!",
- "targetSegment": [
- {
- "content": "Hallo <halos-tb id='423e75c256436cf1b68ba5e653a3874c'><halos-tb id='423e75c256436cf1b68ba5e653a3874c'>Welt</halos-tb></halos-tb>!",
- "sourceSegment": "Hello world!",
- "translatedBy": {
- "id": "cb26237c-3beb-40f3-8e13-77d862f722b5",
- "name": "Test-123",
- "type": "MachineTranslation",
- "score": 0.6217623180360736
}
}
]
}
]
}
], - "errors": [
- {
- "key": "targetLanguage",
- "message": "targetLanguage 'de-gb' is not available for 'en' on your account."
}
]
}
Upload a file to be translated.
File must be either docx, pptx, xlsx, txt, pdf or image (if ocr is enabled) format.
BETA FEATURE: Additional supported file formats xlf, xliff, mxliff and sdlxliff Issues with these files can be reported via e-mail: integrations@lengoo.com .
The maximum file upload limit is 15 MB or 2.000.000 characters.
IMPORTANT: This endpoint accepts multipart forms instead of JSON.
Translate Text
file required | string <binary> The file to translate with a maximum size of 15 megabyte (MB). By default the following types are supported.
These files are supported in the beta stage
For OCR the following are supported.
|
ocr | boolean Default: false [Experimental] This feature is only available to a selected set of users for testing. Whether to apply optical character recognition (OCR) to the provided file. |
sourceLanguage | string </^[a-z]{2}\-[A-Z]{2}$/g> (languageCode) Language code using ISO 639-1 for language and ISO 3166-1 alpha-2 for country. |
targetLanguage required | string </^[a-z]{2}\-[A-Z]{2}$/g> (languageCode) Language code using ISO 639-1 for language and ISO 3166-1 alpha-2 for country. |
languageResources | Array of strings <uuid> (UUID) non-empty IDs of the language resources to be used |
referenceId | string Optional field containing identifier string to help you reference the file on your system. |
object Arbitrary data. Completely up to you. Use it for anything that helps your integration work. metadata key has to be a string and has a maximum length of 256 |
{- "file": {
- "id": "cea273fb-335e-4c09-b64b-bcdebe71cd9c"
}
}
Get detailed information on a single file
id required | string ID of the file |
{- "id": "cb26237c-3beb-40f3-8e13-77d862f722b5",
- "sourceLanguage": "en-US",
- "targetLanguage": "de-DE",
- "ocr": false,
- "status": "failed",
- "createdAt": "2021-12-31T15:00:00.000Z",
- "updatedAt": "2021-12-31T15:00:00.000Z",
- "referenceId": "10c73ddb-fae1-46c9-851d-40e364b121a5",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "errors": [
- {
- "key": "StatsExtractionFailedExceptionCode",
- "message": "Failed while extracting stats"
}
]
}
Downloads translated file. When a translated file is downloaded it would have the filename in the following format : ORIGINAL_FILE_NAME-TARGET_LANGUAGE.FILE_EXTENSION>
id required | string ID of the file |
{- "errors": [
- {
- "key": "ThrottlerException",
- "message": "Too Many Requests"
}
]
}
Provides details about a specific term bank entry
id required | string ID of the Term Bank Entity |
{- "conceptId": "450dd2ac76f55529e19b49b9c978956c",
- "conceptDefinition": "Text describing term",
- "conceptNote": "note related to the term"
}
Provides a list of terms, of the specified language, associated with an entry in the term bank.
id required | string ID of the Term Bank Entity |
language required | string Example: language=de Associated Terms Language |
[- {
- "termId": "c5q1ztcD14j9oyg0Ss00YHMMm",
- "lastModified": "2022-06-22T21:20:53.343Z",
- "segment": "opinione",
- "language": "it",
- "forbidden": false,
- "preferred": false,
- "locale": "it",
- "status": "Approved"
}
]
This is used to get notifications when you have your webhook registered.
Bulk Translation input
events required | Array of strings [ 1 .. 4 ] items Items Enum: "text.job.done" "text.job.failed" "file.job.done" "file.job.failed" webhook events for subscription |
url required | string URL for recieving event, it must be secured with https:// |
secret required | string Secret of the request with the hash request |
{- "events": [
- "text.job.done"
], - "secret": "string"
}
{- "webhookId": "cb26237c-3beb-40f3-8e13-77d862f722b5"
}