Blazor WASM Localization and PreRerendering

Helen Z 1 Reputation point
2021-06-11T18:08:35.813+00:00

We have a website that hosted by ASP.net Core Blazor WASM.

In order to avoid the "loading..." page at the begining, we are using PreRedenering which need to run a Blazor server application.

Blazor WASM PreRendering

We are also using Asp.net core Globalization/localization to display in multiple languages.

We found a problem when ever we refresh the page or switch between the languages:

The pre-rendering page will always load the UI with default culture(language) for the frist time, and then WASM will rerendering the correct language for page.

That make the page display the the default language first, then it switch to selected language.

Is there a way we can handle the pre-rendering from server to modify the culture value when first time laoding the page.

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,407 questions
{count} votes