Translations
Create a Translation
POST
https://localize.cirro.io/api/v2/translationsParameters
| Parameter | Type | Note | |
|---|---|---|---|
translation[content] | required | string | JSON string of the hash you want to translate |
translation[from] | required | string | iso code of the source language |
translation[to] | required | string | iso code of the language to translate to |
translation[translation_type] | enum | Default: auto. Available options: auto, manual, review_translation | |
translation[auto_translation_mode] | enum | Default: async. Available options: async, inline With inline the auto translation is done before the response is returned. | |
translation[formality_level] | enum | Default: default. Available options: default, more, less, prefer_more, prefer_less | |
translation[context_id] | number | The id of an existing context |
Description
Returns the Translation object if creation succeeded. Returns an error if creation failed.
Example
1cat << EOF > payload.json
2{
3 "translation": {
4 "content": "{\"key\":\"Hello World\"}",
5 "from": "en",
6 "to": "fr",
7 "translation_type": "manual",
8 "auto_translation_mode": "async"
9 }
10}
11EOF
12
13curl https://localize.cirro.io/api/v2/translations \
14 -H "Authorization: Bearer <ACCESS_TOKEN>" \
15 -H 'Content-Type: application/json' \
16 -d @payload.json