V
V
vadimstroganov2015-06-09 18:48:34
Ruby on Rails
vadimstroganov, 2015-06-09 18:48:34

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

4 answer(s)
D
Dima, 2015-06-09
@MAXOPKA

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.

E
Eugene Burmakin, 2015-06-09
@Freika

https://github.com/bithavoc/multilang-hstore is a good option

P
Pavel Kononenko, 2015-06-09
@premas

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.

S
SilentFl, 2015-06-10
@SilentFl

We use i18n at home

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question