Machine Translate Action
Overview
This action permits to machine translate texts using a configured MT connector.
The action is configured as follows:
Parameters
Property | Description | Type |
|---|---|---|
type | "MachineTranslate" | string, Mandatory |
localeFrom | The source language of the segments to translate. | string, Mandatory |
localeTo | The target language into which the MT will write translations. | string, Mandatory |
mtConnectorId | The ID of the MT connector to use for translation. This refers to a pre-configured machine translation connector in the system. | int, Mandatory |
toTranslate | Optional, default is Specifies which segments will be machine translated:
| int, Optional |
ifTargetNotEmpty | Optional, default is true
| bool, Optional |
skipGreen | When true, segments with green status (completed/approved) will be skipped and not machine translated. Set to false to include green segments. | Optional, default is true. |
skipLocked | When true, locked segments will be skipped and not machine translated. Set to false to include locked segments. | Optional, default is true. |
Example
{
"scope": {
"type": "Job",
"jobid": "3044"
},
"doSave": true,
"actions": {
"items": [
{
"type": "MachineTranslate",
"localeFrom": "en-US",
"localeTo": "es-MX",
"mtConnectorId": 1956,
"toTranslate": 2,
"skipGreen": true,
"skipLocked": true
}
]
}
}
Full API Call Example
curl --location 'https://WM-22034.wordbee-translator.com/api/resources/segments/view/actions/batch' \
--header 'X-Auth-Token: ***' \
--header 'X-Auth-AccountId: wordbee.test' \
--header 'Content-Type: application/json' \
--data '{
"scope": {
"type": "Job",
"jobid": "3044"
},
"doSave": true,
"actions": {
"items": [
{
"type": "MachineTranslate",
"localeFrom": "en-US",
"localeTo": "es-MX",
"mtConnectorId": 1956,
"toTranslate": 2,
"skipGreen": false,
"skipLocked": false
}
]
}
}'
Notes
The MT connector must be configured in the system before using this action
The
mtConnectorIdcan be obtained from your system's MT connector configurationThis action respects the same scope and query filters as other batch actions
The response follows the standard batch action format with
total,totalChanged, andtotalFailedToSavepropertiesBy default, both skipGreen and skipLocked are true, meaning green and locked segments are excluded from MT