Issues with e-mail translations


I have created a branded e-mail, this e-mail should be in Dutch and French.

I included the following code:

 {% if user.user_metadata.lang == 'nl' %}
  Deze mail is mogelijk gemaakt door:
  {% else %} Cet e-mail a été rendu possible par :
  {% endif %}

when add the {% debug %} statement in the email I receive the following result:

"user": { "email": "", "email_verified": false, "name": "[](mailto:[](", "nickname": "nickname", "picture": "", "user_metadata": { "country": "BE", "lang ": "nl" }, "app_metadata": {}, "logins_count": 1 }, "organization": {}

as you can see the user does have the lang property, however the e-mail does not show the translated NL message.

I don’t seem to find the problem here?