# Set the locale for custom template in New Universal Login flow

**URL:** <https://community.auth0.com/t/set-the-locale-for-custom-template-in-new-universal-login-flow/122244>\
**Category:** Get Help\
**Tags:** branding, new-universal-login-page-templates\
**Created:** [December 4, 2023, 4:00am UTC](https://community.auth0.com/t/set-the-locale-for-custom-template-in-new-universal-login-flow/122244 "2023-12-04T04:00:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![richard8](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@richard8](https://community.auth0.com/u/richard8)\
**Post date:** [December 4, 2023, 4:00am UTC](https://community.auth0.com/t/set-the-locale-for-custom-template-in-new-universal-login-flow/122244/1 "2023-12-04T04:00:58Z")

</div>

We’re using custom login templates with the New Universal Login flow. We have the user’s language preference stored in our app so we would like to be able to set the language/locale explicitly for the login prompts. According to [this page](https://auth0.com/docs/customize/internationalization-and-localization/universal-login-internationalization#language-selection) the locale is detected from the user’s `Accept-language` browser header, however is there a way to override this and pass the locale explicitly?

We are using Next.js and currently have an API handler setup like follows:

```auto

export const GET = handleAuth({
  login: handleLogin({ authorizationParams: { connection: "email" }, returnTo: "/auth-success" }),
  signup: handleLogin({
    authorizationParams: { connection: "email", screen_hint: "signup", returnTo: "/auth-success" },
  }),
});

```

It doesn’t look like there’s a way to pass the locale via `handleLogin()`, or in the URL for the login path `/api/auth/login?ui_locales=de` or to the auth0 widget in the custom template?

We have configured the languages in the tenant settings to allow English (default) and German such that if we change the `Accept-Language` header in the browser the language of the login prompt will change, but is there a way override this?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 7, 2023, 3:11pm UTC](https://community.auth0.com/t/set-the-locale-for-custom-template-in-new-universal-login-flow/122244/3 "2023-12-07T15:11:43Z")

</div>

Hi @richard8,

Welcome to the Auth0 Community!

You tried passing it in the `authorizationParams` object? i.e.

```auto
handleLogin({ 
  authorizationParams: {
    ui_locales:'de'
    }
})
```

---

<div class="post-metadata">

**Author:** ![richard8](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@richard8](https://community.auth0.com/u/richard8)\
**Post date:** [December 8, 2023, 4:51am UTC](https://community.auth0.com/t/set-the-locale-for-custom-template-in-new-universal-login-flow/122244/4 "2023-12-08T04:51:44Z")

</div>

Thanks Dan, that worked. Couldn’t find it in the examples or docs.

---

<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:** [December 22, 2023, 4:52am UTC](https://community.auth0.com/t/set-the-locale-for-custom-template-in-new-universal-login-flow/122244/5 "2023-12-22T04:52:23Z")

</div>

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