简体   繁体   中英

Change i18n translations inline

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM