Skip to content

Path Names translations

kwi edited this page Sep 14, 2010 · 1 revision

I18n_routing: Path Names translations

Now with i18n_routing you can easily translate your path_names like “edit” and “new”.

The global way

In your locales files, just add a path_names scope and translate your path_names :

fr:
  path_names:
    new: 'nouveau'
    edit: 'edition'

For each resources

You can define path names translations more precisely if you want, for this, you just need to use the routes scope :

fr:
  routes:
    users:
      as: utilisateurs
      path_names:
        level: 'niveau'
        groups: 'groupe'
        new: 'nouvel_utilisateur'
        edit: 'edition_utilisateur'