danielcrenna/i18n — pull request #29 by turquoiseowl (2013-01-27 20:29:30+00:00)
Title: New Enhanced Mode plus fixes

Daniel, I've made some considerable additions (hopefully enhancements) to the language selection, routing and matching. However, kept these separate from your original logic for all this with effectively a feature switch (a new Mode setting). Please see the Automatic Routing section of the updated readme for more on this.

The most important point I think about Enhanced mode is that is standardizes the i18n routing so that the langtag is put into the front of the path part of the URL. This seems to be the way i18n is going on the web (if not going down the en.domain or gTLD road). Google webmaster tools supports that pattern and their docs discourage using querystrings or appending the langtag to the path. The point seems to be that it allows you to tell google tools that everything under example.com/en is English.

There are also some small changes to the logic path for Basic mode, but only fixes hopefully. Most notably was a problem with the processing of root URL with language appended e.g. example.com/fr which wasn't working, throwing an ArgumentNull exception in the context wrappers. This seems to work better now with the fix.

I've sprinkled a few TODO and BUGBUG tags throughout the code at places where I can see improvements but haven't wanted to change things.

Quick testing of Basic mode seems to work fine, although I haven't a full site to test it on.

Happy to field any questions.

Cheers Martin