Translate friendly_id in path

49 views
Skip to first unread message

thies

unread,
Oct 8, 2010, 7:33:53 AM10/8/10
to I18n Routing
Hi,

I'm using friendly_id (http://github.com/norman/friendly_id) and would
like to translate the string-id's in the path with I18n Routing.

For example, I have a category-model with the (friendly_) id's
"computer", "garden", etc.

.../category/computer
.../category/garden

These Id's I would like to have translated in the url for the
different languages.
Probably there is a very easy solution :)

Thanks for your help,
Thies

Guillaume Luccisano

unread,
Oct 11, 2010, 2:37:34 AM10/11/10
to i18n-r...@googlegroups.com
Hi,

As this is not part of core url generation, you will need to translate yourself these words with the I18n gem, I don't know how works friendly_id but i18n_routing has nothing to do with these translations, maybe you can mail the author of friendly_id to ask him about that.

Thanks,
Guillaume

2010/10/8 thies <pri...@googlemail.com>

thies

unread,
Oct 11, 2010, 5:52:53 AM10/11/10
to I18n Routing
Hi Guillaume,

thank you very much for your response. I thought there could be a
(even not very clean) solution using the routes scope of i18n_routing
to translate the ids (defining every single id under the routes
scope). Friendly_id unfortunately doesn't support I18n by now.

Thank you,
Thies

On 11 Okt., 08:37, Guillaume Luccisano <guillaume.luccis...@gmail.com>
wrote:
> Hi,
>
> As this is not part of core url generation, you will need to translate
> yourself these words with the I18n gem, I don't know how works friendly_id
> but i18n_routing has nothing to do with these translations, maybe you can
> mail the author of friendly_id to ask him about that.
>
> Thanks,
> Guillaume
>
> 2010/10/8 thies <prie...@googlemail.com>
Reply all
Reply to author
Forward
0 new messages