Closed activestylus closed 14 years ago
Ok I just tried this on a fresh 2.3.8 app and it worked, so there must be something in my own code that's conflicting.
Hi,
Sorry for the delay, but glad you find it yourself !
For speed's sake I ended up using translate_routes:
http://github.com/raul/translate_routes
It was a faster drop-in that just worked right away. I just needed to add one line to my routes.rb and it was good to go.
Some feedback for you based on my experience with both:
It also did something pretty cool, the current locale urls were listed as normal
/users/new
but anything aside from current would automatically get a namespace
/es/usuarios/nuevo
/de/benutzer/neue
All of this with zero configuration, which I thought was pretty nice.
The only downside to this is the fact that it's a plugin (gems are better) and the code hasn't been touched in over a year, which means Rails 3 support is probably not on the horizon.
I definitely plan on using your gem for my Rails 3 apps, and hope that you take notes on my feedback.
Thanks for sharing this gem btw - keep up the good work!
Great, I'm glad you finally get this stuff working event if it was withtout i18n_routing ! And yes, translate_routes does work with Rails3 and I'm not sure I like the way it add automatic namespace.
But thanks for the advice :)
All of my resources are translated with no problems.
However, the named_routes_path namespace gives me no results in my app.
Here is the freaky part though. When I go to script/console it works fine:
But if I call es_welcome_path in my app its undefined, and when I rake routes I dont see it anywhere (or any named route for that matter)
Here is a look inside config/locales/es.yml: es: named_routes_path: sidi: "sidi-8" sidi_info: "sidi-8-sobre-nosotros" sidi_contact: "sidi-8-contacto" sidi_thanks: "sidi-8-gracias" studio: "estudio-de-arquitectura" studio_contact: "estudio-de-arquitectura-contacto" studio_thanks: "estudio-de-arquitectura-gracias" studio_team: "estudio-de-arquitectura-equipo" tech: "tecnicas-de-rehabilitacion" tech_contact: "tecnicas-de-rehabilitacion-contacto" tech_thanks: "tecnicas-de-rehabilitacion-gracias" tech_team: "tecnicas-de-rehabilitacion-equipo" welcome: "bienvenido"
Here is how I'm setting the locale in application_controller:
Any idea why named routes are being ignored by this gem?
FWIW I'm running on 1.8.7-head via RVM