SimpleLocalize REST API offers filter and query options, and uses your API Key which can be used also for modifying translations, so it should be used only in server-side applications and integrations. If you are looking for a way to fetch translations for client-side applications, use Translation Hosting.
This section is about using REST API to fetch translations. It's possible to use it in server-side applications and integrations.
If you are using this endpoint, the authorization is required.
Add API Key for your project as a X-SimpleLocalize-Token
request header.
Querying translations
GET
https://api.simplelocalize.io
/api/v2/translations
Available query parameters
Query parameter | Description |
---|---|
text | query for translated text, uses 'contains with ignore case' |
textStatus | search for empty or not empty translations, allowed values: EMPTY , NOT_EMPTY |
reviewsStatus | filter by review status, allowed values: REVIEWED , NOT_REVIEWED |
key | filter by given translation key, uses 'equals' |
namespace | filter by given translation namespace, uses 'equals' |
language | filter by given language key, uses 'equals' |
customerId | filter by given customer id, uses 'equals'; see customer-specific translations |
page | page for pagination |
size | size for pagination, max size: 500 |
Sample request
GET
https://api.simplelocalize.io
/api/v2/translations?language=en&key=HELLO_WORLD
Response
{
"msg": "OK",
"status": 200,
"data": [
{
"key": "HELLO_WORLD",
"namespace": "common",
"language": "en",
"text": "Hello world!",
"reviewStatus": "REVIEWED",
"lastModifiedAt": "2021-01-01T00:00:00.000Z"
}
]
}
Was this helpful?