Fixes the custom RequestCultureProvider to dynamically add cultures to the supported cultures list, changes the request/builder to not reference a ICultureInfo and instead just a string to avoid allocations and confusion since the handlers will end up as a string anyways. Removes the unnecessary cultureinfo concurrentdictionary because CultureInfo.GetCultureInfo does the same thing.

This commit is contained in:
Shannon
2021-01-11 13:39:09 +11:00
parent b801199e7c
commit bd4006c577
34 changed files with 168 additions and 123 deletions

View File

@@ -30,8 +30,8 @@ namespace Umbraco.Web.Common.Localization
options.RequestCultureProviders = new List<IRequestCultureProvider>();
}
options.RequestCultureProviders.Insert(0, new UmbracoBackOfficeIdentityCultureProvider());
options.RequestCultureProviders.Insert(1, new UmbracoPublishedContentCultureProvider());
options.RequestCultureProviders.Insert(0, new UmbracoBackOfficeIdentityCultureProvider(options));
options.RequestCultureProviders.Insert(1, new UmbracoPublishedContentCultureProvider(options));
}
}
}