Skip to main content

Custom Translations

Translations are used in the user interface of the system to translate labels and other placeholder text into different languages.

The translations Object​

Field NameTypeDescription
iduuidPrimary key of the translation (UUID format).
keystringThe translation key.
languagestringThe language of the translation (e.g., en-US, en-GB).
valuestringThe translation value.

List Translations​

List all translations that exist in TrackVision.

Request​

GET /translations

Query Parameters​

Supports all global query parameters.

Response​

An array of up to limit translation objects. If no items are available, data will be an empty array.

Example​

GET /translations

SEARCH /translations

Retrieve a Translation​

List an existing translation by primary key.

Request​

GET /translations/:id

Query Parameters​

Supports all global query parameters.

Response​

Returns the requested translation object.

Example​

GET /translations/2fc325fb-299b-4d20-a9e7-a34349dee8b2

Create a Translation​

Create a new translation.

Request​

POST /translations

Provide a translation object as the body of your request.

Query Parameters​

Supports all global query parameters.

Request Body​

A partial translation object.

Response​

Returns the translation object for the created translation.

Example​

POST /translations

{
"key": "Test",
"language": "en-US",
"value": "My Test"
}

Create Multiple Translations​

Create multiple new translation.

Request​

POST /translations

Provide an array of translation objects as the body of your request.

Query Parameters​

Supports all global query parameters.

Request Body​

An array of partial translation object.

Response​

Returns the translation object for the created translation.

Example​

POST /translations

[
{
"key": "translation.key",
"language": "en-US",
"value": "My Translation"
},
{
"key": "translation.key",
"language": "en-GB",
"value": "Another Translation"
}
]

Update a Translation​

Update an existing translation.

Request​

PATCH /translations/:id

Provide a partial translation object as the body of your request.

Query Parameters​

Supports all global query parameters.

Request Body​

A partial translation object.

Response​

Returns the translation object for the updated translation.

Example​

PATCH /translations/2fc325fb-299b-4d20-a9e7-a34349dee8b2

{
"value": "My Updated Translations"
}

Update Multiple Translations​

Update multiple existing translations.

Request​

PATCH /translations

{
"keys": translation_id_array,
"data": partial_translation_object
}

Query Parameters​

Supports all global query parameters.

Request Body​

keys Required
Array of primary keys of the translations you'd like to update.

data Required
Any of translation object's properties.

Response​

Returns the translation objects for the updated translations.

Example​

PATCH /translations

{
"keys": ["3f2facab-7f05-4ee8-a7a3-d8b9c634a1fc", "7259bfa8-3786-45c6-8c08-cc688e7ba229"],
"data": {
"value": "Test Value"
}
}

Delete a Translation​

Delete an existing translation.

Request​

DELETE /translations/:id

Response​

Empty body.

Example​

DELETE /translations/12204ee2-2c82-4d9a-b044-2f4842a11dba

Delete Multiple Translations​

Delete multiple existing translations.

Request​

DELETE /translations

Provide an array of translation IDs as the body of your request.

Request Body​

An array of translations primary keys

Response​

Empty body.

Example​

DELETE /translations

["25821236-8c2a-4f89-8fdc-c7d01f35877d", "02b9486e-4273-4fd5-b94b-e18fd923d1ed", "7d62f1e9-a83f-407b-84f8-1c184f014501"]