API Localization
The API is designed to support multiple languages to cater to international users. To get a translated version of a resource, you can pass the locale
parameter in your request or use the Accept-Language
header. For example, to get a resource in Canadian French, you can use locale=fr-CA
or Accept-Language: fr-CA
.
However, it is important to note that not all resources are necessarily translated into all languages. If a translation does not exist for the requested language, the default version of the resource will be returned.
Request Example
GET /v1/resource?locale=fr-CA
Accept-Language: fr-CA
Localized Entities
Localized entities have a dedicated API for managing their translations. This API is accessible at the /translations
endpoint. You can use this API to create, update, delete, get, or list translations of entities.
Available Endpoints
- Create a translation:
POST /translations
- Update a translation:
PUT /translations/{id}
- Delete a translation:
DELETE /translations/{id}
- Get a translation:
GET /translations/{id}
- List translations:
GET /translations
Example of Creating a Translation
POST v1/.../translations
Content-Type: application/json
{
"locale": "fr-CA",
"translatedField": "Translated Value"
}