Skip to main content
Version: 1.5.x

Overview

Engagespot provides a translations feature to translate your notification's content into multiple languages. This feature is available in the Engagespot dashboard.

Translations Overview

Engagespot provides a translations feature that enables you to translate your notification content into multiple languages. To use this feature, you need to set a default locale, which will be used whenever a user's locale is not explicitly defined. You can easily manage this feature directly from the Engagespot dashboard.

How to create a translation

To create a translation, simply click the Create Translation button located on the right side of the translations table. Then, enter a name and choose the locale you want to translate into.

Create Translation

then click create , It will open a json edior where you can write the translation content or you can upload any valid json file.

Translation Editor

Use the translations in your notification content.

Once you have created a translation, you can use it in your notification content. To do this, simply add the translation key in your notification content and it will be replaced with the corresponding translation content.

For example, if you have a translation with the key welcome and the value Welcome to Engagespot in the spanish locale, you can use it in your template edior as follows:

{{translations.welcome_message}}

{' '}

Translation in Template

How to set user's locale

To set user's locale you can simply set a profile attribute named locale to the user's profile. For example, you want to set the user's locale to spanish you can do it as follows:

{
"locale": "es_ES"
}

Refer to the Profile Attributes section for more information.

info

The locale value should be valid combinations of ISO language code and ISO country code (language_COUNTRY). if you dont know the format of the locale simply use the identifier of the translations you just created.

Translations Version Control.

Translations follows the same version control as the rest of the Engagespot features.you can create translations in development environment and then publish and migrate them to production environment.

tip

inorder to see the translations you need to publish them in the development environment.