Ensures the culture is set for requests for both front-end and back office

This commit is contained in:
Shannon
2021-01-08 11:29:07 +11:00
parent b4922d2685
commit c15b416e88
10 changed files with 94 additions and 24 deletions

View File

@@ -48,9 +48,11 @@ using Umbraco.Web.Common.Controllers;
using Umbraco.Web.Common.DependencyInjection;
using Umbraco.Web.Common.Install;
using Umbraco.Web.Common.Lifetime;
using Umbraco.Web.Common.Localization;
using Umbraco.Web.Common.Macros;
using Umbraco.Web.Common.Middleware;
using Umbraco.Web.Common.ModelBinders;
using Umbraco.Web.Common.Mvc;
using Umbraco.Web.Common.Profiler;
using Umbraco.Web.Common.Routing;
using Umbraco.Web.Common.Security;
@@ -226,6 +228,7 @@ namespace Umbraco.Web.Common.DependencyInjection
});
builder.Services.ConfigureOptions<UmbracoMvcConfigureOptions>();
builder.Services.ConfigureOptions<UmbracoRequestLocalizationOptions>();
builder.Services.TryAddEnumerable(ServiceDescriptor.Transient<IApplicationModelProvider, UmbracoApiBehaviorApplicationModelProvider>());
builder.Services.TryAddEnumerable(ServiceDescriptor.Transient<IApplicationModelProvider, BackOfficeApplicationModelProvider>());
builder.Services.AddUmbracoImageSharp(builder.Config);