Language and Translations
BioT is a multilingual platform that offers the flexibility to serve each user in their preferred language.
When making API calls to BioT, clients can request their preferred response language by including the Accept-Language HTTP header in the request.
The value of this header should specify the desired locale, which must be pre-installed on the platform.
To verify the correct locale format and its availability on your platform, follow these steps:
- Access the BioT console.
- Navigate to the "Languages" option within the Settings menu.
-
A list of available languages will be displayed, each with its corresponding locale format:
For instance, to receive replies from BioT in Spanish, you would need to include the following header in your API requests:
Accept-Language: es-es
Managing Locales
BioT supports managing locales through API calls for adding and removing them.
Adding a New Locale:
Make an API to:
POST https://example.com/settings/v1/locales
With the following body:
{
"code": "es-es"
}
Delete a Locale:
Make an API to:
DELETE https://example.com/settings/v1/locales/{id}
Path parameter id
refers to the locale code.
Edit & Hide Existing Locales
Make an API to:
PATCH https://example.com/settings/v1/locales/configuration
With the following body:
{
"availableLocales": [
{
"hidden": false,
"code": "en-au"
},
{
"code": "en-us",
"hidden": true,
"translationFallbackTypes": [
"DEFAULT_LOCALE"
]
}
],
"defaultLocaleCode": "es-au"
}
In this example we hide the default en-us so the only English option shall be Australian English.
Updated 7 months ago