turquoiseowl / i18n

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

Add ability to generate a URL that ignores localization #252

Closed ajbeaven closed 8 years ago

ajbeaven commented 8 years ago

251

Here's the suggested implementation, though I agree it's a bit hacky.

It could perhaps be improved maybe by adding something like a LanguageTag.AddLocalizationIgnoreUrlPrefix(), though I didn't include this as I think it'd likely be misused considering there are better alternatives to most use cases.

turquoiseowl commented 8 years ago

Nice one, thanks. Would you have time to document it too?

turquoiseowl commented 8 years ago

I've augmented the test suite for IGNORE_LOCALIZATION urls. Also moved the check for the prefix to the first thing done with the url to ensure it always gets stripped, whether or not a langtag is in the url.

ajbeaven commented 8 years ago

Thanks for your changes - sorry I should have added tests for this.