Locale
Manage and retrieve translations for various text strings used across the Amili platform. Each locale entry contains translations for multiple languages and can be associated with specific applications.
Available Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /locales | Retrieve a list of locale entries |
GET | /locales/{id} | Retrieve a specific locale entry |
Example Request
Below is an example of retrieving a specific locale entry. Other operations follow similar request/response patterns with the same data structure.
URL: GET /locales/61b21dc50e8820cff2c5d888
Headers:
x-api-key: {your_access_token}Response Code: 200 OK
Response Body:
json
{
"_id": "61b21dc50e8820cff2c5d888",
"application": "ada_agreement",
"locale_tag": "common__case_cancel",
"description": "",
"translations": {
"en": {
"translation": "Revoked case",
"comment": ""
},
"sv": {
"translation": "Återkallat ärende",
"comment": ""
}
},
"machine_translations": {
"fi": {
"translation": "Peruutettu tapaus",
"comment": "language: finnish"
},
"da": {
"translation": "Ophævet sag",
"comment": "language: danish"
}
},
"_updated": "Tue, 04 Jan 2022 14:54:05 GMT",
"_created": "Thu, 09 Dec 2021 15:16:21 GMT",
"translation_pending": false,
"_etag": "05bd52bbdd9946cd878520e64647b118"
}Response Properties
| Property | Type | Required | Description |
|---|---|---|---|
_id | string | Yes | Unique identifier for the locale entry |
application | string | Yes | Application identifier (e.g. "ada_agreement")* |
locale_tag | string | Yes | Unique tag identifying the translation string |
description | string | No | Optional description of the translation's usage |
translations | object | Yes | Manual translations in different languages |
machine_translations | object | No | Automatically generated translations |
translation_pending | boolean | Yes | Whether translation updates are pending |
_created | string | Yes | Creation timestamp |
_updated | string | Yes | Last update timestamp |
_etag | string | Yes | Entity tag for concurrency control |
Translation Properties
| Property | Type | Required | Description |
|---|---|---|---|
translation | string | Yes | The translated text |
comment | string | No | Optional comment about the translation |
*) For complete list of values and details, please see Locale
