18n_routing and redirect to proper URLs
I developed a multilanguage social network in Rails 3 about food and recipes. I used the i18n_routing gem from http://github.com/kwi/i18n_routing. Everything works fine but we have an issue.
If a user (using the English version) share an item, for example on Facebook, we got an URL like this: http://domain.com/en/the-best-food-recipe/recipes/123.
Now if an another user is logged in using the Italian language and click on that URL, the social network will open in English, even if I have the user session and I know that his language is Italian. Is there a way to translate the URL back to the Italian one so that I can easily redirect the user to开发者_运维知识库: http://domain.com/it/the-best-food-recipe/ricette/123 ?
Thanks in advance
精彩评论