Actions
Lionbridge uses delayed jobs to translate some text from one language to another. That means you will not be able to receive a translated text immediately in response to a request for translation.
Therefore, you need to request to create a translation job, get the code of your request, and periodically poll Lionbridge to find out the status of your request.
Once you get the status REVIEW_TRANSLATION, you can request to receive the translation.
To poll about job status, use the Retrieve job status action.
To retrieve translated phrase(s), use the Retrieve translation action.
The actions' in/out schemas can be found at /lib/schemas.
Batch
Input
{
"fieldNames": [
"color",
"size"
],
"fieldValues": [
"red",
"three pounds"
],
"sourceLang": "en",
"targetLangs": [
"de",
"ru"
]
}
Output
{
"jobCode": "1749264e-88a6-44d9-8c71-8a77394f9160:::["29425287-7689-45a2-9f87-29a8b2e1c598"]"
}
Object properties
Input
{
"sourceObject": {
"hello": "hello world",
"capital": "London is the capital of Great Britain"
},
"sourceLang": "en",
"targetLang": "de"
}
Output
{
"jobCode": "1749264e-88a6-44d9-8c71-8a77394f9160:::["29425287-7689-45a2-9f87-29a8b2e1c598"]:::1"
}
Array of objects
Input
{
"sourceArray": [
{
"hello": "hello world",
"capital": "London is the capital of Great Britain"
},
{
"color": "red",
"mood": "great mood"
}
],
"sourceLang": "en",
"targetLang": "de"
}
Output
{
"jobCode": "1749264e-88a6-44d9-8c71-8a77394f9160:::["29425287-7689-45a2-9f87-29a8b2e1c598"]:::2"
}
Retrieve job status
Input
{
"jobCode": "1749264e-88a6-44d9-8c71-8a77394f9160:::["29425287-7689-45a2-9f87-29a8b2e1c598"]:::2"
}
Output
{
"updateTime": "2018-03-28T12:36:33.656Z",
"jobCode": "1749264e-88a6-44d9-8c71-8a77394f9160:::[\"29425287-7689-45a2-9f87-29a8b2e1c598\"]:::2",
"statusCode": "REVIEW_TRANSLATION"
}