enriclluelles/route_translator — pull request #43 by gi-lunaweb (2014-01-09 11:10:15+00:00)
Title: Support for custom locale param position

This changeset adds some logic in RouteTranslator::Translator.translate_path to detect if the locale param is present
in path (based on RouteTranslator.locale_param_key). If not, locale is inserted at the beginning of the path as before.

This do not break anything compared to previous release and let developpers control where they want the local param to appear and allow use of more complex routing such as `/:country/:locale/path/to/some/pages`.

It fixes the same problem as [PR38](https://github.com/enriclluelles/route_translator/pull/38) and [PR35](https://github.com/enriclluelles/route_translator/pull/35) without any new configuration options. Moreover, the detection is done on each paths and you can use both default and controled param injection in the same application.

We (at [LunaWeb](http://www.lunaweb.fr/)) really like to use the route_translator gem and this is the only feature we think is missing to meet our workflow.