Localization
The fulfillmenttools platform supports localization, which enables you to manage data in multiple languages. This document outlines how to change user and platform locales, request specific languages for your requests, and handle localized information in entities.
Supported languages
A list of currently supported languages can be obtained via the API:
Usage
Many of our entities already have the localization feature, meaning the target language is already set for you in the result.
For example, we use the title
in our articles (that is used, e.g. in the pick job line items). For creation, you have to define the different translations for the title
, like in the following example:
If the title
is requested by the REST API, the title
field will be automatically filled with the corresponding translation. For example, if you use a user with German language, the result will look like this:
Request specific language
To request a specific language, you have different possibilities:
User-specific language: Determined by the
locale
from the user object. This is automatically part of the Bearer token and will be used to select the language in the response.Request-specific language: Use the query parameter
locale
, to get a specific language back.Localized entity field: The
*Localized
field holds all translations every time.
Fallback language
If a requested language is unavailable, the platform uses the following fallback mechanism:
Language specified in user settings
Default platform language
English
The first available language for the entity
Non-localized field value of the entity (only available on old entities)
Change user locale
More Users-API information can be found here: REST API documentation - Users
To change the user locale, send a PATCH
request to the user endpoint, including the new locale in the request body.
After the user locale change, you must manually refresh the Bearer token to use the new language directly.
Change default platform locale
More Configurations-API information can be found here: REST API documentation - Configurations
The default platform locale sets the standard language for the whole platform. Change it by sending a PUT
request to the relevant configuration endpoint.
Last updated