Blazor WebAssembly - Localization with .resx without reloading application on language changed possible?
Asked Answered
T

0

7

I am working on a Blazor Wasm app which has localization using resource files (.resx).

When looking into the official documentation / and the sample solution from Microsoft, it seems like changing language needs to reload the entire application? (documentation)

Does anyone have a workaround for not reloading the app when language has changed? I'm required to keep my translations in my .resx files, so the workaround should still base on .resx files...

Threaten answered 25/3, 2021 at 10:11 Comment(3)
Why is this required? Its normally just developers that change the language. Blazor WASM uses the browsers configured language. That being said do you expect users to configure their browser in a language and use another on your client?Trollope
In my case it is required to be able to hold the application state when changing language, without relying on caching etc. I just can not believe that Blazor WASM does not have a fix for that!!! I mean isn't that exactly what WASM should be able to do on client? But thanks for the response, I will give feedback to my stakeholders that it will require restarting the entire application...Threaten
Indeed frustating having to reload the pageGiule

© 2022 - 2024 — McMap. All rights reserved.