This is split into two sections, Translation Hosting and REST API. The CDN offers free, fast and public access to your translations, it can be used in client-side application. 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.
Table of contents
Translation Hosting
Translation Hosting is a content-delivery network (CDN), it's a fast and safe to share the link to the public. It's not rate-limited, so you don't have to worry about the number of requests. You can use it safely in client-side applications. Fetching data from Translation Hosting is available in all pricing plans including the Community plan.
Parameters
projectToken
- your project token which can be found in the 'Integrations > Project credentials' tab,languageKey
- language key from the 'Languages' tab, e.g.:en
,pl
,de
,environment
- environment name,_latest
or_production
,namespace
- namespace, e.g.:common
,home
,auth
,customerId
- customerId used for customer-specific translations, e.g.:ikea
,adidas
.
Get all translations
Example response
{
"de": {
"SALE": "Verkauf",
"ADDRESS": "Adresse"
},
"fr": {
"SALE": "soldes",
"ADDRESS": "adresse"
}
}
Get translations by language key
Example response
{
"SALE": "Verkauf",
"ADDRESS": "Adresse"
}
Get languages
Example response
[
{
"key": "de",
"name": "Deutsch"
},
{
"key": "en",
"name": "English"
},
{
"key": "es",
"name": "Español"
}
]
Get translations by language key and namespace
Example response
{
"SALE": "Verkauf",
"ADDRESS": "Adresse"
}
Get translations by language key, namespace and customerId
Example response
{
"SALE": "Verkauf",
"ADDRESS": "Adresse"
}
Get customers
Example response
[
{
"key": "ikea",
"name": "IKEA"
},
{
"key": "adidas",
"name": "Adidas"
}
]
Get customer-specific translations
Example response
{
"SALE": "Verkauf",
"ADDRESS": "Adresse"
}
REST API
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.
Please note that the API Access is rate-limited, and you should not use it to fetch translations for every end-user nor use it in client-side applications. Use Translation Hosting instead.
Search translations
Available query parameters
Query parameter | Description |
---|---|
text | query for translated text, uses 'contains with ignore case' |
key | filter by given translation key, uses 'equals' |
language | filter by given language key, uses 'equals' |
customerId | filter by given customer id, uses 'equals'; see customer-specific translations |
Sample request
Response
{
"msg": "OK",
"status": 200,
"data": {
"content": [
{
"key": "HELLO_WORLD",
"language": "en",
"text": "Hello world!",
"description": "Hello world description"
}
]
}
}