Created
February 10, 2021 10:28
-
-
Save enisn/20fa149a4ab788f1decc420a85a19d1e to your computer and use it in GitHub Desktop.
BetterBlazorApp - I18NPortable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyComponentBase : ComponentBase | |
{ | |
[Inject] | |
public Events Events { get; set; } | |
protected override void OnAfterRender(bool firstRender) | |
{ | |
if (firstRender) | |
{ | |
Events.LanguageChanged += (_, lang) => StateHasChanged(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment