My site is using Auth0’s Lock UI to handle Logins and Password Reset Requests.
At the Lock UI, it is multilingual, with the JavaScript “options.language” being either “en” or “fr”.
In the Auth0 Admin Panel’s “Emails” → “Templates” → “Change Password”, is there a variable/macro that represents the language from the Lock UI that had triggered that Email Template?
What I want to do is something like this in the Email Template:
{% if lang == ‘fr’ %}Bonjour{% else %}Hello{% endif %}
So if the user was using Lock in French, then the Password Reset Email will be in French, and if they then changed it to English, then triggering the Password Reset Email would send off an English email instead.
Unfortunately it’s not doable for now to get the value from Lock. You can do it the way @andrelacasse suggested. For the first one I suggest submitting a feature request through our product feedback site providing all the context to the usecase: