Localization
Understory supports localization for experiences and events allowing hosts to describe their experiences in select languages and locales.
The Understory API also allows you to work with localized values through the Accept-Language
header. By asking for a specific language or locale you will get the translated values in your response.
Possible values are limited to the configured languages in your Storefront languages. If you request a locale that is not supported, the API will produce an error response.
The value of the header supports content negotiation so you can provide a list of accepted languages and their priority. The API will not return mixed languages based on the negotiation protocol. If you need multiple translations of a resource, e.g., for fallback mechanisms, you should make several requests with an Accept-Language
header for each locale needed. Again, please be aware that if no match is found, the API will produce an error response.
- https://api.understory.io/v1/experiences
curl -i -X GET \
'https://api.understory.io/v1/experiences?cursor=string&limit=100' \
-H 'Accept-Language: en-GB; q=1.0, en-US; q=0.8' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'
{ "next": "string", "items": [ { … } ] }