routes.rb
MyApp::Application.routes.draw do
root :to => 'home#index'
localized do
resources :cars
resource :admin, :controller => :admin
resource :dashboard do
member do
match 'vlk', :as => :vlk
end
end
end
end
routes.yml
cs:
cars: 'auta'
admin: 'admincesky'
routes:
dashboard:
as: 'novy'
path_names:
new: 'cesky_member'
vlk: 'tzz_cesky'
named_routes_path:
vlk: 'tzz_cesky'
2.secondly, i tried next gem 'route_translator' and i cant get running 'route_translator' gem i am getting this error
/ruby-1.9.2-p320/gems/actionpack-3.0.14/lib/action_dispatch/routing/route.rb:25:in `initialize': can't convert Array into String (TypeError)
if i add line at the end of routes.rb file
Dt::Application.routes.translate_from_file('config/locales/routes.yml')
I had the same problem.
I tried a lot - without any solution.
I tried this gem https://github.com/kwi/i18n_routing - that fixed my problems :-)