I have configured I18n, Globalize and FriendlyId in a Multilingual Rails Application. Moreover, I pretend to translate url according locale.
For example:
http://localhost:3000/es/micontroller/mi-casa
http://localhost:3000/en/mycontroller/my-house
Those urls already exists, the translation works as expected.
These are the language switcher links I have added:
= link_to_unless I18n.locale == :es, "Español", locale: :es
= link_to_unless I18n.locale == :en, "English", locale: :en
My issue is that when I switch languages, the url only changes the locale parameter, instead of changing slug.
For example, toggling from English to Spanish results in something like:
http://localhost:3000/es/mycontroller/my-house
PD: Is a good practice what I pretend to do with my urls? I have searched some time with no results.