How can I make sure that the password reset page in the Universal Login Experience opens in the user’s language? Currently I have the user’s metadata set to their preferred language, translated email templates, and the ui_locale
passing through the React SDK, but still whenever a user clicks on the password reset link in their email, it still directs to a page in English. Thanks in advance for the help!
Hi @amy123
Welcome to the Auth0 Community!
Reading through your use-case, I would say that you are definitely on the right path, with just a few tweaks missing to make everything work correctly. Passing the ui_locales
parameter is a good start, however it ends in a hash mark (#) that makes any characters appended to the URL be treated as fragments instead of a query string parameter.
To solve this, I highly recommend reading through the steps outlined in our documentation on Customize Change Password Page Language and watch the short video that details the process, but essentially you need to navigate to the Change Password template and replace the default <a>
tag with the following (French is used in the following example) :
<a href="{{ url | remove: "#" }}&ui_locales=fr-FR">Click Here</a>
In addition, to set the language dynamically based on the user’s metadata, you can use this :
<a href="{{ url | remove: "#" }}&ui_locales={{user.user_metadata.lang}}">Click Here</a>
I recommend having the following documentations handy as well:
Hope this helped!
Gerald