Force full page reload on language change
Updated the `Navigation.NavigateTo` method in `LanguageControls.razor` to set the `forceLoad` parameter to `true`. This ensures that the application performs a full page reload when the language is changed, improving consistency in language updates.
This commit is contained in:
@@ -80,7 +80,7 @@
|
|||||||
_selected = option;
|
_selected = option;
|
||||||
_isOpen = false;
|
_isOpen = false;
|
||||||
await LocalizationService.SetLanguageAsync(option.Code);
|
await LocalizationService.SetLanguageAsync(option.Code);
|
||||||
Navigation.NavigateTo(Navigation.Uri, forceLoad: false);
|
Navigation.NavigateTo(Navigation.Uri, forceLoad: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private sealed record LanguageOption(string Code, string FlagClass, string ShortName);
|
private sealed record LanguageOption(string Code, string FlagClass, string ShortName);
|
||||||
|
|||||||
Reference in New Issue
Block a user