Locales
Getting all locales for a Project
GET /projects/:projectId/locales
Response
{
"meta": {
"status": 200
},
"payload": [
{
"id": "c8b26ce6-a71c-4c4c-9ced-4499407e03e8",
"ident": "de_DE",
"language": "German",
"country": "Germany",
"pairs": {
"menu.welcome.label": ""
},
"project_id": "8fae6705-e50d-4211-a445-e245d1a3f30a"
},
{
"id": "497e34d7-f010-405c-ad6c-fc3a05a5e928",
"ident": "en_US",
"language": "English",
"country": "USA",
"pairs": {
"menu.welcome.label": ""
},
"project_id": "8fae6705-e50d-4211-a445-e245d1a3f30a"
}
]
}
Creating a new locale
POST /projects/:projectId/locales
Parameters (JSON)
Name | Type | Description |
---|---|---|
ident | string | The locale's ident. |
country | string | The locale's country. |
language | string | The locale's language. |
Example
{
"ident": "de_DE",
"country": "Germany",
"language": "German"
}
Response
{
"meta": {
"status": 201
},
"payload": {
"id": "c8b26ce6-a71c-4c4c-9ced-4499407e03e8",
"ident": "de_DE",
"language": "German",
"country": "Germany",
"pairs": {
"menu.welcome.label": ""
},
"project_id": "8fae6705-e50d-4211-a445-e245d1a3f30a"
}
}
Getting a specific locale
Note: the uri to access specific locales uses the
localeIdent
instead of thelocaleId
, that means that you should use the standard identifiers such asde_DE
oren_US
to name a few.
GET /projects/:projectId/locales/:localeIdent
Response
{
"meta": {
"status": 200
},
"payload": {
"id": "c8b26ce6-a71c-4c4c-9ced-4499407e03e8",
"ident": "de_DE",
"language": "German",
"country": "Germany",
"pairs": {
"menu.welcome.label": ""
},
"project_id": "8fae6705-e50d-4211-a445-e245d1a3f30a"
}
}
Updating the locale's pairs
PATCH /projects/:projectId/locales/:localeIdent/pairs
Parameters (JSON)
Name | Type | Description |
---|---|---|
:key | string | The key-value pair to be updated. |
Example
{
"menu.welcome.label": "Willkommen!"
}
Response
{
"meta": {
"status": 200
},
"payload": {
"id": "c8b26ce6-a71c-4c4c-9ced-4499407e03e8",
"ident": "de_DE",
"language": "German",
"country": "Germany",
"pairs": {
"menu.welcome.label": "Willkommen!"
},
"project_id": "8fae6705-e50d-4211-a445-e245d1a3f30a"
}
}
Deleting a locale
DELETE /projects/:projectId/locales/:localeIdent
Response
Note: delete actions do not return body content. They are acknowledged by a HTTP Status Code of 204
// HTTP Status 204 No Content