Skip to content

Instantly share code, notes, and snippets.

@gonzedge
Created November 10, 2011 19:30
Show Gist options
  • Save gonzedge/1355890 to your computer and use it in GitHub Desktop.
Save gonzedge/1355890 to your computer and use it in GitHub Desktop.
Rails 3.1 – Translating routes
es:
resources:
users: 'usuarios'
resource:
contact: 'contacto'
named_routes:
about-us: 'quienes-somos'
routes:
jobs:
as: 'trabajos'
path_names:
new: 'nuevo'
edit: 'editar'
localized(I18n.available_locales) do
# Your routes here
# This are just test routes
resources :users, :jobs
resource :contact
match 'home' => 'jobs#index'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment