# Changing language in login for Next.js app is not work (nextjs-auth0/New Experience)

**URL:** <https://community.auth0.com/t/changing-language-in-login-for-next-js-app-is-not-work-nextjs-auth0-new-experience/87134>\
**Category:** Get Help\
**Tags:** language, nextjs, login, auth0\
**Created:** [July 18, 2022, 3:36pm UTC](https://community.auth0.com/t/changing-language-in-login-for-next-js-app-is-not-work-nextjs-auth0-new-experience/87134 "2022-07-18T15:36:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yskstdev](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yskstdev/32/38818_2.png) [@yskstdev](https://community.auth0.com/u/yskstdev)\
**Post date:** [July 18, 2022, 3:36pm UTC](https://community.auth0.com/t/changing-language-in-login-for-next-js-app-is-not-work-nextjs-auth0-new-experience/87134/1 "2022-07-18T15:36:02Z")

</div>

- Which SDK this is regarding:@auth0/nextjs-auth0
- SDK Version: 1.9.1

Hello  
I’m trying to change language in Universal Login page(New Experience).  
According to [document](https://auth0.com/docs/customize/internationalization-and-localization/universal-login-internationalization#new-universal-login-experience-localization), It need to do below

- select the language(in my case ‘ja’) as default in Tenant Setting.
- send `ui_locales` parameter to the Authorization Request endpoint

I set the language, and built sample application according to [docs](https://auth0.com/docs/quickstart/webapp/nextjs/01-login).  
And to pass `ui_locales` parameter, create below api route(/api/auth/login.ts)

```auto
import type { NextApiRequest, NextApiResponse } from 'next';
import { handleLogin } from '@auth0/nextjs-auth0';

export default async function login(req: NextApiRequest, res: NextApiResponse) {

  await handleLogin(req, res, {
    authorizationParams: {
      ui_locales: 'ja',
    },
  });
}

```

I thought it would work,however english(not default lang) login page was displayed.  
Is additional setting needed ,or are there any mistakes?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [July 19, 2022, 12:48am UTC](https://community.auth0.com/t/changing-language-in-login-for-next-js-app-is-not-work-nextjs-auth0-new-experience/87134/3 "2022-07-19T00:48:43Z")

</div>

Hi @yskstdev,

Welcome to the Auth0 Community!

I understand you are looking to change the language on your login page.

As you have found, you will need to select your preferred language in your Tenant Settings and pass the `ui_locales` query parameter in your Authorize Request.

It should look something like the following:

```auto
https://YOUR_DOMAIN/authorize?
    response_type=code&
    client_id=YOUR_CLIENT_ID&
    redirect_uri=https://YOUR_APP/callback&
    scope=SCOPE&
    audience=API_AUDIENCE&
    state=STATE&
    ui_locales=ja

```

Alternatively, if you know you will use only one language, you could deselect all languages in your Tenant Settings except for your preferred language. This way, it defaults to that language, and you will not need to pass the `ui_locales` query parameter.

Please let me know how this works for you or if you have any questions.

Thank you.

---

<div class="post-metadata">

**Author:** ![yskstdev](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yskstdev/32/38818_2.png) [@yskstdev](https://community.auth0.com/u/yskstdev)\
**Post date:** [July 19, 2022, 3:56pm UTC](https://community.auth0.com/t/changing-language-in-login-for-next-js-app-is-not-work-nextjs-auth0-new-experience/87134/4 "2022-07-19T15:56:39Z")

</div>

@rueben.tiow  
thank you for answer!

I tried to deselect all languages in my Tenant Settings except for my preferred language as you told,  
but It did not work…(English page was displayed).

Paste the image below.

- My language setting  

- Displayed login page  

Do you have any idea what the cause of the problem is?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [July 19, 2022, 6:04pm UTC](https://community.auth0.com/t/changing-language-in-login-for-next-js-app-is-not-work-nextjs-auth0-new-experience/87134/5 "2022-07-19T18:04:11Z")

</div>

Hi @yskstdev,

Thank you for your response and update.

After inspecting your screenshot, it appears that you are currently using the Classic Universal Login experience.

Because of that, could you please check that you have selected the New Universal Login experience in your Auth0 Dashboard?

 ![Screen Shot 2022-07-19 at 11.01.44 AM](https://global.discourse-cdn.com/auth0/original/3X/5/1/511328d9dacd55d2101a77e0cfe0a7b4f9ab7535.png)

And, could you please check that you have disabled the **Customize Login Page** toggle?

 ![image](https://global.discourse-cdn.com/auth0/original/3X/5/8/582d5fb9eb10b1b3f5b1bdec980f362cce5f72fe.png)

After doing so, you will be using the New Universal Login Experience, and you will be able to see the correct language settings displayed.

Please let me know how it goes.

Thank you.

---

<div class="post-metadata">

**Author:** ![yskstdev](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yskstdev/32/38818_2.png) [@yskstdev](https://community.auth0.com/u/yskstdev)\
**Post date:** [July 20, 2022, 8:12am UTC](https://community.auth0.com/t/changing-language-in-login-for-next-js-app-is-not-work-nextjs-auth0-new-experience/87134/6 "2022-07-20T08:12:30Z")

</div>

@rueben.tiow

Thank you! it works!

In my settings,  
I have already selected the New Universal Login experience,  
but the Customize Login Page toggle have been enabled.  
I toggled it disable, so everything went well!  
Thank you very much!!

---

<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:** [December 21, 2022, 3:38pm UTC](https://community.auth0.com/t/changing-language-in-login-for-next-js-app-is-not-work-nextjs-auth0-new-experience/87134/7 "2022-12-21T15:38:10Z")

</div>


