# Universal Login Password Reset unable to get user's language

**URL:** <https://community.auth0.com/t/universal-login-password-reset-unable-to-get-users-language/39392>\
**Category:** Get Help\
**Tags:** password-reset, universal-login\
**Created:** [March 13, 2020, 8:55pm UTC](https://community.auth0.com/t/universal-login-password-reset-unable-to-get-users-language/39392 "2020-03-13T20:55:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaleLaPlante](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dalelaplante/32/16499_2.png) [@DaleLaPlante](https://community.auth0.com/u/DaleLaPlante)\
**Post date:** [March 13, 2020, 8:55pm UTC](https://community.auth0.com/t/universal-login-password-reset-unable-to-get-users-language/39392/1 "2020-03-13T20:55:02Z")

</div>

I’m trying to make our password reset screen bilingual based on the user’s settings. We have the “language” parameter set in the user’s meta data (we also tried a dozen other names for it) but in the password reset screen, the “lang” variable never picks this up. It always returns “en-US,en;q=0.5”. I set up the proper languages in the auth0 tenant options, so that shouldn’t be a problem. No documents mention anything about how to do it, they just say “lang” will contain the user’s language, which there doesn’t appear to be any way to actually set using the management API, dashboard, etc. How can I do this?

---

<div class="post-metadata">

**Author:** ![mathiasconradt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mathiasconradt/32/12758_2.png) [@mathiasconradt](https://community.auth0.com/u/mathiasconradt)\
**Post date:** [March 14, 2020, 12:00am UTC](https://community.auth0.com/t/universal-login-password-reset-unable-to-get-users-language/39392/2 "2020-03-14T00:00:39Z")

</div>

I assume you are using the Classic ULP and not the New ULP (referring to Auth Dashboard \> Universal Login).

In the password reset page template, you don’t have direct access to the user object. It’s not available as an object there, and thus also no info about the user\_metadata.

So, the way to go is to **add the user’s language information already in the email template** : add the language of the user to the URL of the confirmation link in the mail, like this:

1. In the Auth0 Dashboard, go to Email Templates \> Select “Change Password”, look for `{{ url }}` in the template and replace it with this:  
`<a href="{{ url }}{{user.user_metadata.lang}}">`

2. In the **password reset page** , you’ll then have this **info available** via `document.location.hash` (in the Javascript section)

---

<div class="post-metadata">

**Author:** ![DaleLaPlante](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dalelaplante/32/16499_2.png) [@DaleLaPlante](https://community.auth0.com/u/DaleLaPlante)\
**Post date:** [March 19, 2020, 7:40pm UTC](https://community.auth0.com/t/universal-login-password-reset-unable-to-get-users-language/39392/3 "2020-03-19T19:40:02Z")

</div>

Just finished implementing and testing, works like a charm! Thank you!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [March 20, 2020, 7:49am UTC](https://community.auth0.com/t/universal-login-password-reset-unable-to-get-users-language/39392/4 "2020-03-20T07:49:55Z")

</div>

Glad we were able to help!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 4, 2020, 7:59am UTC](https://community.auth0.com/t/universal-login-password-reset-unable-to-get-users-language/39392/5 "2020-04-04T07:59:11Z")

</div>

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