Access user language user_metadata.lang in email template

Hello Auth0 folk!

I’m trying to implement a multi-language email template, specifically the password change email. The documentation here says:

You can use Liquid syntax along with properties from the user object to alter the content based on the user preferred language. For example:

{% if user.user_metadata.lang == 'es' %}
{% else %}
  Hi {{ user.name }}, ...
{% endif %}

… but it just doesn’t do it for me. Also when using {% debug %}, the user object only has these variables:

How is the language set?

Thanks!

1 Like

Hmm thanks for reporting that!

It seems that you’re doing everything right according to the doc. Let me reach out to the team to find out more about that!

1 Like