I need to build a multi-language site, where the client wil开发者_运维问答l add records in many languages. I wanna know if Rails has something to do a website like this. Imagine these scenario: I have a Post and Category. The user language sessions is set to en-US. When the user do a search for category 'car' the system will retrieve the Category model and all Posts TRANSLATED in that language.
Can I accomplish this with Rails 3?
Thanks in advance
You can do this by yourself by adding a translation table for the posts and categories tables and join them with the original tables. Alternatively, have a look at Globalize2: https://github.com/joshmh/globalize2 which does all the backend work for you.
精彩评论