using BlueWest.Localization.Models; using Microsoft.AspNetCore.Localization; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.Extensions.Options; namespace CodeLiturgy.Views.Localization.ViewComponents; public class CultureSwitchViewComponent : ViewComponent { private readonly IOptions localizationOptions; public CultureSwitchViewComponent(IOptions localizationOptions) => this.localizationOptions = localizationOptions; // public IViewComponentResult Invoke() // { // var cultureFeature = HttpContext.Features.Get(); // var model = new CultureSwitch() // { // SupportedCultures = localizationOptions.Value.SupportedUICultures.ToList(), // CurrentUICulture = cultureFeature.RequestCulture.UICulture // }; // return View(model); // } }