0

I am developing a rails web application in which the user need the ability of changing the text which appears in it. I have been using i18n gem in all page to manage the different languages. Now, I am developing the editable part, so I am considering to change the .yml files with the translations in a controller. Is this procedure the best way to do it?. Another possibility that I have considered is using a model with all translations who really access to the translations.

Thanks in advance.

1 Answers1

1

I wouldn't recommend making something custom to edit the yaml files from within your application. Then I'd rather switch to a database approach instead. You probably want to have a look at Rails: store translations in database

Community
  • 1
  • 1
Danny
  • 5,945
  • 4
  • 32
  • 52
  • You alredy have a gem that can do something like this saving the translations inside the database https://github.com/elpulgardelpanda/i18nline-rails . It also have a simple user interface to translate and other usefull stuff. But if you use a database for translations I suggest to add some caching or use the yaml files for the most common words to be translated. Reading everything from the database all the time is kind of slow. Also take a look at Redis as storage. – Marko Jurinčič Feb 08 '14 at 10:05