# How to translate my universal login? Angular

**URL:** <https://community.auth0.com/t/how-to-translate-my-universal-login-angular/96956>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [December 22, 2022, 8:26am UTC](https://community.auth0.com/t/how-to-translate-my-universal-login-angular/96956 "2022-12-22T08:26:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Totodile](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/totodile/32/12714_2.png) [@Totodile](https://community.auth0.com/u/Totodile)\
**Post date:** [December 22, 2022, 8:26am UTC](https://community.auth0.com/t/how-to-translate-my-universal-login-angular/96956/1 "2022-12-22T08:26:44Z")

</div>

Hello everyone.

I’m trying to make a prelogin, in order to let users to insert their mail and their language. Then, I send this information with QueryParams in order to pre-fill their mail and to translate the login…  
Actually, the mail is working and being prefilled, but the language is not working (is always showing the english language)… I’ve been reading and I set up the tenant config in order to accept four different languages but none of them seems to be working…

Here is my code, where I’ve a pre-login view to insert mail and language, and send it:

```auto
login() {
    this.preLoginRq = {
      email: this.email,
      language: this.selectedLanguage
    };
    this.loginService.preLogin(this.preLoginRq).subscribe(
      (response: BoolRs) => {
        if (response.result) {
          this.router.navigate(['auth0'], {
            queryParams: {
              login_hint: this.email,
              language : this.selectedLanguage
            }
          })
        }
      }
    )
  }

```

And then , in the Auth0 component , I’m using this:

```auto
loginWithRedirect(): void{
    this.auth.loginWithRedirect({
      appState: {target: '/home'},
      login_hint: this.route.snapshot.queryParams['login_hint'],
      ui_locales: this.route.snapshot.queryParams['language']
    });
  }

```

As I mentioned, mail is working but not the translation… Can you help me? Am I missing something?  
Thank you in advance.

---

<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:** [December 22, 2022, 5:27pm UTC](https://community.auth0.com/t/how-to-translate-my-universal-login-angular/96956/3 "2022-12-22T17:27:16Z")

</div>

Hi @Totodile,

Thanks for reaching out to the Auth0 Community!

I understand you would like to translate the language in the New Universal Login.

Firstly, did you get a chance to check out our [Universal Login Internationalization](https://auth0.com/docs/customize/internationalization-and-localization/universal-login-internationalization) documentation?

Essentially, you will need to pass the preferred language in the `ui_locales` query parameter in the `/authorize` request.

For example:

```auto
https://YOUR_DOMAIN/authorize?
    response_type=code&
    client_id=YOUR_CLIENT_ID&
    redirect_uri=https://YOUR_APP/callback&
    scope={scope}&
    state={state}&
    ui_locales=de

```

For this to work, you will also need to enable these languages in your [Auth0 Dashboard \> Settings](https://manage.auth0.com/#/tenant/general) and scroll down until you find **Languages** section and select all the languages that apply.

Once this is done, the New Universal Login Page will translate the languages.

Here is a related Community Post answering a similar question: [Changing language in login for Next.js app is not work (nextjs-auth0/New Experience) - #3 by rueben.tiow](https://community.auth0.com/t/changing-language-in-login-for-next-js-app-is-not-work-nextjs-auth0-new-experience/87134/3)

Please let me know if you have any further questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![Totodile](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/totodile/32/12714_2.png) [@Totodile](https://community.auth0.com/u/Totodile)\
**Post date:** [December 23, 2022, 7:31am UTC](https://community.auth0.com/t/how-to-translate-my-universal-login-angular/96956/5 "2022-12-23T07:31:10Z")

</div>

Hello Rueben and thanks for your answer.

I don’t really understand how to implement your proposed solution.

Isn’t the loginWithRedirect() method the same as you mentioned? I’m passing login\_hint (and the email is being prefilled) and ui\_locales as parameter(because it can change) for the login and everything is working fine, I can login into my tenant , etc. It’s just the translation. And, btw, I’ve enabled my languages too.

Thank you.

EDIT: Problem solved!

I was passing as a parameter ui\_locales, but I went to check HTML universal login code and found that line  
`var language = config.extraParams.language;`  
so just changed the name of parameter and now it works.

Thank you!

---

<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:** [January 6, 2023, 7:31am UTC](https://community.auth0.com/t/how-to-translate-my-universal-login-angular/96956/6 "2023-01-06T07:31:44Z")

</div>

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