using Microsoft.AspNetCore.Localization; using Microsoft.AspNetCore.Mvc; namespace BlueWest.Views.Utils; public static class ControllerExtensions { public static void HandleGlobalization(this Controller controller) { var context = controller.HttpContext; var requestCultureFeature = context.Features.Get(); var currentCultureName = Routes.DefaultCultureName; if (requestCultureFeature != null) { currentCultureName = requestCultureFeature.RequestCulture.Culture.Name; } controller.ViewData[LanguageViewStorage] = currentCultureName; } public static void HandlePageName(this Controller controller, string location) { } }