Query Texts
Get system-extracted one-to-one correspondence of original text and translation, returned in JSON format
curl
1curl -X POST 'https://dltranslator.com/api/v1/translation/queryTexts' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{ "taskId": "[query taskId]" }'
Request Parameters
Parameters | Type | Description |
---|---|---|
*taskId | String | ID corresponding to the text task |
Response
Parameters | Type | Description |
---|---|---|
texts | JSON | System-extracted one-to-one correspondence of original text and translation |
revisedTexts | JSON | User-initiated upload of revised translations for document regeneration |
Update Texts
Upload translations that need manual modification. If you choose to retranslate, the document will be translated again; otherwise, it will only be saved to revisedTexts.
This interface enables Post Editing capabilities.
curl
1curl -X POST 'https://dltranslator.com/api/v1/translation/updateTexts' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{ "taskId": "[update taskId]", "revisedTexts": {"example":"样例"}, "startTranslation": [true or false] }'
Request Parameters
Parameters | Type | Description |
---|---|---|
*taskId | String | Translation Task ID to be Modified |
*revisedTexts | JSON Object | Revised translation, key is the original text, value is the translation |
startTranslation | Boolean | Whether to restart translation, default is false |
Response
Parameters | Type | Description |
---|---|---|
success | Boolean | Update successful, or failed |