@namespace Oqtane.Themes.Controls @inherits ThemeControlBase @using System.Globalization @inject ILocalizationService LocalizationService @inject NavigationManager NavigationManager @if (_supportedCultures != null) {
} @code{ private string _selectedCulture; private string[] _supportedCultures; protected override async Task OnParametersSetAsync() { var interop = new Interop(JSRuntime); _selectedCulture = await interop.getCulture(); _supportedCultures = await LocalizationService.GetSupportedCultures(); } private async Task SetCultureAsync(string culture) { var interop = new Interop(JSRuntime); await interop.setCulture(culture); NavigationManager.NavigateTo(NavigationManager.Uri, forceLoad: true); } }