Theme

Translations

Create a Translation

POST https://localize.cirro.io/api/v2/translations

Parameters

ParameterTypeNote
translation[content]requiredstringJSON string of the hash you want to translate
translation[from]requiredstringiso code of the source language
translation[to]requiredstringiso code of the language to translate to
translation[translation_type]enumDefault: auto. Available options: auto, manual, review_translation
translation[auto_translation_mode]enumDefault: async. Available options: async, inline
With inline the auto translation is done before the response is returned.
translation[formality_level]enumDefault: default. Available options: default, more, less, prefer_more, prefer_less
translation[context_id]numberThe 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
Previous
About Translations