Problem:
In Blazor Server with render mode 'ServerPrerendered', I am observing that the route values are present in the fist call of OnInitializedAsync().
However, the route values become empty after the framework calls OnInitializedAsync() the second time.
Question
- Is there a way to get the route values after the second call? I tried the '
Server' render mode rather than 'ServerPrerendered'. It resulted in calling theOnInitializedAsync()only once, but route values are empty.
My goal is to enable route based localization by getting language name from route (e.g. '//mypage'. As the routes are lost after the 2nd call, the language code cannot be obtained and the page fails to be localized.
Test Project in GitHubhttps://github.com/tsutomua/blazor/tree/main/LocalizationTestApp.
