turquoiseowl / i18n

Smart internationalization for ASP.NET
Other
556 stars 156 forks source link

Url localization don't works when controllers has three characteres in name #354

Closed gilbertogwa closed 6 years ago

gilbertogwa commented 6 years ago

If I use:

var url = Url.Action("Index", "Mdf") // generates URL **/Mdf** (without localization)

If I use:

var url = Url.Action("Index", "MdfX") // generates URL **/en/Mdf**

I tried manipulate exclusion filter on Application_Start, but dont worked:

var strX = @"(^\/api\/)|((sitemap.xml|.css|.less|.jpg|.jpeg|.png|.gif|.ico|.svg|.woff|.woff2|.ttf|.eot)$)"; i18n.UrlLocalizer.QuickUrlExclusionFilter = new System.Text.RegularExpressions.Regex(strX, System.Text.RegularExpressions.RegexOptions.IgnoreCase);

turquoiseowl commented 6 years ago

Have you seen?: https://github.com/turquoiseowl/i18n/issues/275

gilbertogwa commented 6 years ago

I had not seen.

However, after studying these issues I decided to use the URL localization scheme void:

i18n.UrlLocalizer.UrlLocalizationScheme = i18n.UrlLocalizationScheme.Void;