turquoiseowl / i18n

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

Controller name must be more than 3 chars #370

Closed roux1max closed 6 years ago

roux1max commented 6 years ago

Hi there, First of all, thanks for the work you do, this plugin is really nice, however I just stumbled upon a crispy little problem.

I didn't check how you include the locale into the links but it seems you use regular expressions. The problem is: If you name one of your Controller AbcController (or anything that has 3 letters or less before "Controller"), the generated URL for this controller does not have the locale in it.

Example :

I have a controller named BsiController with an action, let's say List(). When I want to generate a link to this action using @Html.ActionLink, the resulting link does not include the locale:

@Html.ActionLink("My link", "List", "Bsi") generates the following URL http://localhost:59051/Bsi/List instead of http://localhost:59051/fr/Bsi/List.

Thanks for your time !

turquoiseowl commented 6 years ago

This sounds like a known issue that has been raised before, e.g. here: https://github.com/turquoiseowl/i18n/issues/201

Could you look back at those and get back here if of no help.

Thanks.

roux1max commented 6 years ago

Thanks for the answer, looks like it is the same problem!

Maybe a little word in the documentation would help future users about that ;)

turquoiseowl commented 6 years ago

You're right - done.