Last updated

How can I translate Frontegg emails?

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

Store user's language on user metadata object

You can set user's metadata either from the [ENVIRONMENT] → Management ➜ Users ➜ User session metadata with for example:

{"en": false, "he": true}

har

On the email template itself, you can wrap the template as below:


{{#if metadata.en}}

English template

{{else}}

Hebrew template

{{/if}}

Another option is to save the strings that need to be translated on the user's metadata as well and use only translated strings inside the emails instead of full templates.


Email subjects

It is not possible to translate Email Subjects at this time, please reach out to us to get updates when this ability is added.


For more details on conditional emails, we recommend following the official handlebars documentation and our guide for supported conditions.