Introduction
In order to provide a smooth, customized user experience, it is often necessary to translate elements such as reward or mission names into several languages. This guide will help you use the available translation variables to display correctly localized content according to the needs of your platform and your users.
Show translations
1. Use a specific language
If you wish to display the name of a reward in a specific language, you can do so by directly calling the variable associated with that language. For example, for Norwegian:
{{ event.reward_name_i18n.no }}
This method is useful if you need to display content in a predefined language, regardless of the user's language setting.
2. Display automatically according to user language
To automatically adapt the language to the user's preferred language, you can use a dynamic method. This method consults the user's language settings and displays the appropriate translation:
{{ event.reward_name_i18n[person|lookup:'locale_language'] }}
This ensures that users see reward names in their preferred language.
Emails concerned
New mission email : "new_mission"
event.mission_name_i18n
Points earned email : "points_earned"
event.mission_name_i18n
Email reward or birthday reward : "reward_redeemed / birthday_gift"
event.reward_name_i18n
Reward reminder email : "reward_reminder"
event.reward_name_i18n
event.next_reward_name_i18n
Email reward not used : "reward_unused"
event.reward_name_i18n
💡 If you're using Brevo, replace “event” with “params”.