Localizing IdentityServer in Blazor WebAssembly app #24429
Unanswered
ThaRaven403
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone!
I'm trying to build a Blazor WebAssembly app that uses IdentityServer and also is localized. In Blazor, the localization works well, with a change of culture that resets the CurrentCulture and CurrentUICulture and then reloads the app.
In the Server project, I scaffolded the Register page and added some resx files and the IStringLocalizer in the page.
My issue I'm struggling with at the moment is to set the culture for those Identity pages.
I tried adding a DelegatingHandler in the Client to add the culture in the headers, but the handler is not entered in, as if the call to the identity routes were not recognized.
I also tried calling an API controller to set the culture, but this changes it only for the current request and when I go to the Register page, it's back to the default culture.
I haven't tried it, but I think it could work : to modify the route called to add the culture in the query string. The thing is that I'd rather not scaffold every view if I only need to modify a few of them.
So it's where I'm at now, looking for ideas or guidance on how this could be achieved.
Thanks in advance for your ideas!
Bruno
Beta Was this translation helpful? Give feedback.
All reactions