Skip to main content

Internationalization

This section explains how to translate the Mambo widgets into other languages and customize their appearance.

Adding custom translations

To add a new language to the SDK, you must define a language object before initializing the SDK. The example below shows how to add Polish (pl) as a supported language:

JavaScript

In the example above, we add Mambo.lang.langs.pl as the first statement in the mamboCallbacks array. The 'pl' represents the language abbreviation, which is then referenced in the Mambo.init() method to activate the language.

Note

The language object must be configured before calling the Mambo.init() function.

Note

The language object structure may change between releases. If you maintain a translation, check the documentation with each release to ensure you have the latest properties.

Visual customization

Beyond language customization, you can also modify the appearance of widgets through:

  1. Theme selection: Choose from predefined color schemes by setting the theme option in Mambo.init():
JavaScript
  1. CSS overrides: You can also apply custom CSS to override widget styling. Each widget has specific CSS classes that can be targeted for customization.

  2. Position configuration: For elements like notifications, you can control their position on screen:

JavaScript
  1. Custom templates: you can fully customise the rendering of the widgets by changing their underlying templates. For detailed information please refer to the templates.

By combining language translation and visual customization, you can ensure the gamification elements integrate seamlessly with your site's look and feel while providing a localized experience for your users.