How to translate Frontegg emails

Frontegg uses HTML and standard handlebars and hence, supports {{if}} and {{else}} statements inside our templates.

To store user's language in your user's metadata,

You can either set your user's metadata in [YOUR_ENV] ➜ Backoffice ➜ Users ➜ User's metadata like so: {"en": false, "he": true}, or on the email template itself, wrapping the template as follows:


{{#if metadata.en}}

English template

{{else}}

Hebrew template

{{/if}}

You can also save the strings that need to be translated within the user's metadata and use only translated strings inside the emails instead of full templates.

NOTE:

It is impossible to translate Email Subjects at this time, please contact us to get updates when this ability is added.

We recommend following the official handlebars documentation for more details on conditional emails.