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:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user