# How to localize Change Password (Link) email template (React Native SDK / dbconnections/change\_password)?

**URL:** <https://community.auth0.com/t/how-to-localize-change-password-link-email-template-react-native-sdk-dbconnections-change-password/190798>\
**Category:** Get Help\
**Tags:** user-password-management, user-management\
**Created:** [August 19, 2025, 11:32pm UTC](https://community.auth0.com/t/how-to-localize-change-password-link-email-template-react-native-sdk-dbconnections-change-password/190798 "2025-08-19T23:32:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sefer](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sefer/32/54849_2.png) [@sefer](https://community.auth0.com/u/sefer)\
**Post date:** [August 19, 2025, 11:32pm UTC](https://community.auth0.com/t/how-to-localize-change-password-link-email-template-react-native-sdk-dbconnections-change-password/190798/1 "2025-08-19T23:32:31Z")

</div>

I’m trying to add multilingual support (English + Dutch) to the **Change Password (Link)** email template in Auth0.

My client app (React Native) calls `resetPassword` using the SDK:

```auto
await auth0.auth.resetPassword({
  email,
  connection: "Username-Password-Authentication",
});

```

Which under the hood calls **/dbconnections/change\_password** ([docs](https://auth0.com/docs/api/authentication/change-password/change-password))

The email template is customized in **Branding → Email Templates → Change Password (Link)** ([docs](https://auth0.com/docs/customize/email/email-templates/use-liquid-syntax-in-email-templates), [docs 2](https://auth0.com/docs/customize/email/email-templates)).

Auth0 docs suggest we can use `request_language` in templates to switch content:

```auto
{% assign language = request_language | slice: 0,2 %}
{% if language == "nl" %}
  Wachtwoord opnieuw instellen
{% else %}
  Reset Password
{% endif %}

```

I tried sending headers like `X-Request-Language` / `Accept-Language` from the SDK call, but when I debugged with `{% debug %}` in the template, **`request_language` was not present**. The context only included `user`, `application`, `url`, etc., but no `request_language`.

Right now the only suggestion I’ve seen is to use `user_metadata.lang` in the template. But I don’t have any appropriate flow where I can capture and persist the user’s language. **It should not be the only option to get the user’s language for these emails.**

So my questions are:

1. Does `request_language` actually work for the **Change Password (Link)** template when triggered via `/dbconnections/change_password`? Or is it only supported for other email types (e.g. Passwordless, Blocked Account, etc.)?
2. Is there a way to pass a language parameter in the reset password request that flows into the email template?
3. If not, what’s the recommended approach to localise reset password emails without relying on `user_metadata.lang`?

If possible, I’d like to keep the Auth0 flow for sending the reset emails, but right now, I can’t get the language context into the template.

---

<div class="post-metadata">

**Author:** ![sumansaurav](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sumansaurav/32/70627_2.png) [@sumansaurav](https://community.auth0.com/u/sumansaurav)\
**Post date:** [August 20, 2025, 2:36am UTC](https://community.auth0.com/t/how-to-localize-change-password-link-email-template-react-native-sdk-dbconnections-change-password/190798/2 "2025-08-20T02:36:53Z")

</div>

## 1. Does `request_language` work for Change Password emails?

**No, `request_language` does NOT work for the Change Password (Link) template** when triggered via `/dbconnections/change_password`. This is a known limitation. The `request_language` variable is primarily supported for:

- Passwordless email templates
- Some verification emails
- Welcome emails in certain flows

But **not** for password reset emails triggered through the Management API or `/dbconnections/change_password` endpoint.

## 2. Can you pass language parameters in the reset password request?

Unfortunately, **no**. The `/dbconnections/change_password` endpoint and the SDK’s `resetPassword` method don’t accept language parameters that flow into the email template context. The headers you tried (`X-Request-Language`, `Accept-Language`) are not processed by Auth0 for this specific flow.

## 3. Recommended approaches without `user_metadata.lang`

Here are your viable options, ranked by practicality:

### Option 1: Use Application Metadata (Recommended)

If your app serves a specific language market, you can use the application context:

liquid

```auto
{% assign app_name = application.name | downcase %}
{% if app_name contains 'dutch' or app_name contains 'nl' %}
  <h1>Wachtwoord opnieuw instellen</h1>
  <p>Klik op de onderstaande link om uw wachtwoord opnieuw in te stellen:</p>
{% else %}
  <h1>Reset Password</h1>
  <p>Click the link below to reset your password:</p>
{% endif %}

```

Or use application metadata if you configure it:

liquid

```auto
{% if application.metadata.default_language == 'nl' %}
  <h1>Wachtwoord opnieuw instellen</h1>
{% else %}
  <h1>Reset Password</h1>
{% endif %}

```

### Option 2: User Email Domain Detection

Use the user’s email domain to infer language:

liquid

```auto
{% assign email_domain = user.email | split: '@' | last %}
{% if email_domain contains '.nl' or email_domain == 'company.nl' %}
  <h1>Wachtwoord opnieuw instellen</h1>
{% else %}
  <h1>Reset Password</h1>
{% endif %}

```

### Option 3: Custom Email Provider (Most Flexible)

Switch to a custom email provider where you have full control:

1. **Configure a custom email provider** (SendGrid, Mailgun, etc.)
2. **Create an Auth0 Action** that triggers on password reset
3. **Send custom emails** with full language support

Example Action:

javascript

```auto
exports.onExecutePostChangePassword = async (event, api) => {
  const { user, request } = event;
  
  // You can capture language from custom claims or other sources
  const language = user.app_metadata?.language || 'en';
  
  // Send custom email via your provider
  await sendCustomPasswordResetEmail(user.email, language);
  
  // Optionally suppress Auth0's default email
  // (This requires configuration changes)
};

```

### Option 4: Multiple Applications Approach

Create separate Auth0 applications for different languages:

- `myapp-en` for English users
- `myapp-nl` for Dutch users

Then use application-specific templates or route users to the appropriate application based on their language preference.

### Option 5: Workaround with User Metadata

If you can capture language during any user interaction (login, signup, profile update), store it in user metadata:

javascript

```auto
// During any authenticated flow
await auth0.users.updateUserMetadata(user.sub, {
  language: 'nl'
});

```

Then use in template:

liquid

```auto
{% if user.user_metadata.language == 'nl' %}
  <h1>Wachtwoord opnieuw instellen</h1>
{% else %}
  <h1>Reset Password</h1>
{% endif %}

```

## Alternative: Geographic Detection

You could also use a hybrid approach with JavaScript in your email template (though limited):

liquid

```auto
<script>
  // Basic geographic/browser language detection
  const browserLang = navigator.language || navigator.userLanguage;
  const isNL = browserLang.startsWith('nl');
  
  if (isNL) {
    document.querySelector('.email-content').innerHTML = `
      <h1>Wachtwoord opnieuw instellen</h1>
      <p>Klik op de onderstaande link om uw wachtwoord opnieuw in te stellen:</p>
    `;
  }
</script>

```

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [August 21, 2025, 2:52pm UTC](https://community.auth0.com/t/how-to-localize-change-password-link-email-template-react-native-sdk-dbconnections-change-password/190798/3 "2025-08-21T14:52:56Z")

</div>

Hi everyone!

Thank you @sumansaurav for providing such a comprehensive guide regarding the matter at hand!

As they have advised, the options above would be suitable alternatives regarding implementing localization for the Change Password (Link) template.

If you have any other questions regarding the matter, please feel free to let us know!

Kind Regards,  
Nik

---

<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:** [September 4, 2025, 2:53pm UTC](https://community.auth0.com/t/how-to-localize-change-password-link-email-template-react-native-sdk-dbconnections-change-password/190798/4 "2025-09-04T14:53:36Z")

</div>

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