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:

GET https://{YOUR_TENANT_NAME}.api.fulfillmenttools.com/api/configurations/supportedlocaless

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:

"titleLocalized": {
    "de_DE": "Dies ist ein sehr schöner Titel",
    "en_US": "This is a very nice title"
}

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:

"title": "Dies ist ein sehr schöner Titel",
"titleLocalized": {
    "de_DE": "Dies ist ein sehr schöner Titel",
    "en_US": "This is a very nice title"
}

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:

  1. Language specified in user settings

  2. Default platform language

  3. English

  4. The first available language for the entity

  5. 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.

PATCH https://{YOUR_TENANT_NAME}.api.fulfillmenttools.com/api/users/{userId}
{
    "actions": [
        {
            "action": "ModifyUser",
            "locale": "de_DE",
            ...
        }
    ],
    "version": 2
}

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.

PUT https://{YOUR_TENANT_NAME}.api.fulfillmenttools.com/api/configurations/locale
{
    "locale": "de_DE",
    ...
    "version": 42
}

Last updated