Translation Hosting is a content-delivery network (CDN) for your translations. It's enables you to safely deliver translations anywhere in the world with superfast access speed. It's available in all pricing plans including the Community plan.
Parameters
To fetch the basic translations, you need to provide only your project token and environment key in the URL. Other parameters are optional and can be used to get translations for a specific language, namespace or customerId.
projectToken
- your project token,languageKey
- language key from the 'Languages' tab, e.g.:en
,pl
,de
,environment
- environment key, e.g.:_latest
or_production
,namespace
- namespace, e.g.:common
,home
,auth
,customerId
- customerId used for customer-specific translations, e.g.:ikea
.
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",
"isDefault": false,
"icon": "de"
},
{
"key": "en",
"name": "English",
"isDefault": false,
"icon": "gb"
},
{
"key": "es",
"name": "Español",
"isDefault": false,
"icon": "es"
}
]
See blog post about hosted country flags and learn how to use
icon
values to show flags in your app.
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"
}
Error responses
At the moment, the only error response you can get is 404
when requested translation is not found,
and the response body will look like this:
{
"status": 404,
"msg": "Hosting resource not found"
}