views:

44

answers:

1

I am making a RoR site that is delivered in several languages, and want to change a part of the url by its language.

ex.

http://xxxx/en/index.html

http://xxxx/fr/index.html

I know I can do this via the route.rb

map.locale ':lang/index.html'

and designate the language when calling this in view. However, there is an exception to this, when in the default language of the site, I want the url to be without the language identifier,

http://xxxx/index.html

as so.

Currently I cannot find a way to git rid of the / after the language identifier,

http://xxxx//index.html

is there a better way to do this?

+1  A: 

It's not (yet) possible.
But you'll find some solution on this stackoverflow question.

Damien MATHIEU
thanks that should do the trick! thanks for pointing me to that
Saifis