Answer the question
In order to leave comments, you need to log in
Content in three Ruby On Rails languages?
Hello. Tell me which direction to go. The task is to develop a website with localization in three languages.
That is, there will be an admin panel, and there should be an opportunity to choose which language the entry is currently being written to.
To create on three tables in base of everything and everything? news_ru, news_en, news_fr ? Or is there a better option?
Answer the question
In order to leave comments, you need to log in
Recently had the same issue.
I used the globalize gem
https://github.com/globalize/globalize
In the model, you specify which fields you have translated, write migrations, roll (migrations), the fields in the model will be saved depending on the locale.
Use globalize only if the translation is dynamic (for example, the ability to add products, news, etc., in several languages). In all other cases, describe everything in yml locales. This dictionary is very easy to edit and accepted by all translation agencies.
And it is today the most optimal way of localization, since in production it is only loaded into RAM once, and then all the work goes on with it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question