Hello,
I am struggling with setting up the internationalization, more specifically, translating to Romanian.
I am using the auth0/auth0-angular package, and Angular v15.1.4
My setup looks like this:
and also included the ui_locales property when calling loginWithRedirect:
this.auth.loginWithRedirect({ui_locales: 'ro'} as RedirectLoginOptions<AppState>);
Still, when I am redirected to the login page, I get the content in English.
I read a lot of posts, and questions, but nothing helped. What am I doing wrong?
Thank you,
Marius Vuscan
Hi @vuscan.marius ,
Thanks for reaching out to the Auth0 Community!
I understand you have issues passing in the ui_locales
query parameter when using the loginWithRedirect
method.
Just to clarify, could you confirm if you are calling the function similar to the following?
loginWithRedirect() {
this.auth.loginWithRedirect({
ui_locales: 'ro'
});
}
Doing so should call the /authorize
endpoint with the ui_locales
query parameter appended. For example:
https://{yourDomain}/authorize?
response_type=code&
client_id={yourClientId}&
redirect_uri={https://yourApp/callback}&
scope={scope}&
state={state}&
ui_locales=ro
If you continue having issues, could you please capture these events in a HAR file and send them to me via DM?
I look forward to your reply.
Thanks,
Rueben
Yes, I am calling the loginWithRedirect function, in the same way as in your code snipped.
It seems that the ui_locales parameter is not present in the request.
wHi @vuscan.marius ,
Thank you for your response.
After collaborating via direct messages, we were able to get it to work with the following code:
this.auth.loginWithRedirect({
screen_hint: 'signup',
authorizationParams: { ui_locales: 'ro' } } as RedirectLoginOptions<AppState>);
Please reach out again if you have any further questions. I’d be happy to help!
Thanks,
Rueben
system
Closed
March 21, 2023, 11:03pm
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.