-
Notifications
You must be signed in to change notification settings - Fork 65
Design changes to known/allowed culture list and cache #111
Comments
@Eilon we should have the option to make the application use the browser language (Accept-Language header) without having to specify every single possible culture in equivalent to: |
@omuleanu I believe there were some concerns around allowing completely arbitrary cultures that browsers send, which would potentially cause internal culture caches to potentially grow infinitely, causing memory issues. On OSes such as Windows 10, there is an infinite number of valid cultures, and ASP.NET Core Localization has to cache them (because creating cultures is a bit expensive), so if browsers send en-US-1, en-US-2, ..., en-US-9999 then ASP.NET's culture cache would grow and take up all memory. Our belief is that sites only support a relatively small set of cultures (at most a few dozen, and that's extremely rare), so listing them all is reasonable. If a site wishes to support completely arbitrary cultures (i.e. allow anything a browser sends), then they will have to use some other middleware. @ryanbrandenburg @DamianEdwards was this the exact reason? Or was there something else? |
The text was updated successfully, but these errors were encountered: