Auth0 Home Blog Docs

Localising custom email templates

Hi, we have setup custom email templates for our organisation. We also have a requirement to localise these emails where possible. We’re using the recommended option from the documentation for localisation using Liquid syntax, i.e
{% elsif user.user_metadata.locale == ‘en-GB’ %}
{% else %}
default stuff
I was wondering if it’s possible to pass the locale directly to the API to make this available in the email template? As sometimes the user’s profile will not be available

Hey @davidbrown, are you referring to the management API? If so, you may be able to add this through the syntax param. However to confirm what you previously stated, you would need to primarily resolve this through Liquid Syntax which I have referenced the docs below for historical context. Please let me know if this helps you in your quest.

Hi James, thanks for replying, it was more of a query about what variables are available to use within the email templates. It doesn’t look like there’s a way of passing a “locale” variable alongside the common variables or the specific variables for each email template.

It does look like there’s a “request_language” variable made available in the passwordless email, but not for other email templates.

Was just wondering if I’m missing anything really!

What you’re saying and pointing to @davidbrown is totally correct.

Some time ago one of the users I talked with described similar usage desire and then reported some feedback (the same thing you’re trying to say) and we communicated it to our product teams but there’s no info on the timeline for such enhancements.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.