enriclluelles / route_translator

Translate your rails app route to various languages without the hassle
MIT License
861 stars 142 forks source link

Route Inflections #121

Open pusewicz opened 8 years ago

pusewicz commented 8 years ago

Is it possible to translate the new part of the path for different resources?

In Spanish new would translate to nuevo or nueva depending on the gender of the resource.

tagliala commented 8 years ago

Hi,

it should not be possible at the moment, I don't think this gem supports inflections

pusewicz commented 8 years ago

Yeah, but having the ability to define the translation per resource would be enough.

tagliala commented 8 years ago

@pusewicz I was thinking about the same feature

Labeling as "help wanted", everyone feel free to submit a PR with proper tests.

Please do not +1 here

sunny commented 8 years ago

A good way to do this is to change the default new to something you can translate.

localized do
  resources :categories, path_names: { new: "new_category" }
end

In your translations you can now translate new_category to new in english and nueva in spanish.