url_for and path_for failing in several ways.

72 views
Skip to first unread message

Christoffer Brodd-Reijer

unread,
Nov 21, 2011, 12:35:43 PM11/21/11
to i18n-r...@googlegroups.com
Hi,

Followed your wiki pages but couldn't get the stuff to work. :/

I am trying to achieve translated urls but with a locale prefix. I currently have a setup like this:

default:
/
/about
/contact
/devices
/devices/new
etc...

english:
/en
/en/about
/en/contact
/en/devices
/en/devices/new
etc...

swedish:
/sv
/sv/about
/sv/contact
/sv/devices
/sv/devices/new
etc...

And so on. Now, I want to keep these intact and still working, but add these:

/sv/om -> /sv/about
/sv/kontakt -> /sv/contact
etc..

(note that /om and /kontakt should not work).

I installed your gem as it seemed perfect for the job, and followed the instructions for Rails 3 (I'm using 3.1). But when I use the news_path (for example) I don't get "/sv/nyheter", instead I get "nyheter?i18n_locale=en"

I would also want to know if it's possible to do this:
link_to 'foo', :i18n_locale => 'sv'
will go to /sv/nyheter when on /en/news, or /sv/kontakt when on /contact.

Guillaume Luccisano

unread,
Nov 21, 2011, 12:48:37 PM11/21/11
to i18n-r...@googlegroups.com
Hello,

I think the gem is still not compatible with Rails 3.1 :/
I have currently no time to fix it :/

Sorry for that

2011/11/21 Christoffer Brodd-Reijer <ephr...@gmail.com>
Reply all
Reply to author
Forward
0 new messages