Skip to main content

Internationalisation

Mambo's platform supports multiple languages, allowing you to serve content to users in their preferred language. This guide explains how to implement internationalisation in your application.

Language configuration

API request headers

The APIs provide responses in English by default. To receive responses in another supported language, send the Accept-Language header with the appropriate language code:

HTTP

Default language settings

You can change the default language in the administration panel, which will cause the APIs to return main properties in this default language automatically.

Handling translations

When sending JSON data to create or update a mechanic, all property values are considered to be in the default language, regardless of the "Accept-Language" header in the request.

To provide translations for languages other than the default, use the "translations" property in your request.

Example: Adding translations

The following example shows how to update the Portuguese translation of a Behaviour in a site that has English as the default language:

JSON

Best practices

  • Always provide translations for user-facing content
  • Test your application with different language settings
  • Consider cultural differences when designing internationalised experiences
  • Use language-specific formatting for dates, numbers, and currencies