I m trying to achieve full internationalization of my routes in a Rails3.1 app. I m already using Francesc Pla s rails-translate-routes to localize route actions and resources. The last step is to be able to translate slugs for some of my models.
有待翻译的道路:
http://myhost.com/products/pharmacy --> http://myhost.com/productos/farmacia
我有一张表格的通道。
# routes.rb
match products/:category_slug => "products#index"
我有一个示范类,其实例为:#<Category id: 1, slug: “pharmacy”>
, I do find_by_slug
主计长。
关于如何翻译<代码>的任何想法:类别_slug 部分路线?