damienbod / AspNetCoreLocalization

Localization.SqlLocalizer & ASP.NET Core MVC Localization Examples
http://damienbod.com/2015/10/21/asp-net-5-mvc-6-localization/
MIT License
251 stars 101 forks source link

Changes for (1) case insensitive searches and (2) falling back to parent record if not found #88

Closed suntereo closed 2 years ago

suntereo commented 2 years ago

This library is very helpful. Thank you!

However, there are two enhancements that I think others could benefit from.

First, I would like to make it so that matching LocalizationCulture is case insensitive. If a person managing localization data uses “en-us” instead of “en-US” for a record, it will not be found because the search today is case sensitive. I would like to change it to make it case insensitive.

Second, I would like to enhance fallback behavior so that if there is no "en-US" record in the table but there is "en", it will return "en" instead if not found. This change could further be enhanced by adding a setting to turn on/off.

damienbod commented 2 years ago

looks great thanks