how to change locale in URL using Routing Filter gem Rails I18n application?

Posted by Zack Xu on Stack Overflow See other posts from Stack Overflow or by Zack Xu
Published on 2012-06-06T16:39:33Z Indexed on 2012/06/06 16:40 UTC
Read the original article Hit count: 218

I installed and set up routing-filter as described on the gem documentation page. https://github.com/svenfuchs/routing-filter

It works for the default locale. For example, if I set up my default locale as :en,the site is in English, and if I set my default locale as :zh, the site is in Chinese.

www.site.com/zh/home (the default locale path /en is automatically added to the URL)

But how can I make my site support BOTH languages?

when the default locale is :zh, I tried to change the URL by substituting the "zh" with "en" but the page is still in Chinese, not English.

Is this something not supported by the routing-filter gem? If not, is there some other gem I can use?

Or have I not set up the routing-filter gem properly?

Thanks!

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about internationalization