Translation of models in Ruby on Rails 3.0 -


Using Ruby on Rail 3.0, I would like to see the pages where side-by-side translations are in the posts . For example, a page will look like this

  + --------------- + -------------- - + ----------------- + | Hello Hola | Banjur | + --------------- + --------------- + ----------------- + ... (can be a lot of languages). Hello world | Hola, world | Banjur, monde | + --------------- + --------------- + ----------------- +  

What is an easy way to go about this? I do not believe it can be solved with I18N because it usually needs to set a locale and translate that language to the entire page. I want multiple columns of languages ​​(these languages And how many are unknown too). I know that I can make many tables for translations such as Posts, Postital Translation, and PostBody Translation, but this is not the best way to do this. Has anyone ever solved anything like this?

As I understand that you want to translate the rows of the table you make it simple, and yet I can experiment with the best practice which I found and used in 3 projects. Add PostTranslation model with your fields, such as title, text, etc. and special columns: post_id (in your example) and locale.

It can be used (which supports the introduction of Rail 3 with it) or with the use of the plugin I developed (I have just tested it on Rail 2.3, but its After that I will be able to release it in very long time (version 0.4) 3)

This is very easy to use.

If you have any questions, then just write me a message on one gitub.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -