Translations
Create a Translation
POST
https://localize.cirro.io/api/v2/translations
Parameters
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] | required | enum | auto , manual , review_translation |
translation[auto_translation_mode] | optional | enum | either async or inline to decide if you want the translation being made in th e same |
Result
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