Thanks a lot for that, that's a good reply :) On Tue, Apr 27, 2010 at 07:02, Walter McGinnis <walter.mcgin...@gmail.com>wrote:
> There isn't really one answer to where to store different language > values for a string. It depends on the case. There are two main > ones. > > For static strings (text in templates, error messages), using > locales/*.yml makes sense as they are easy to edit and use. They are > called frequently and rarely change and thus loading them into memory > once makes sense rather than pulling them from the database (though > you could compromise and use cache per locale to offset this). See the > translate plugin (http://github.com/newsdesk/translate) to add an > administrator interface for them. For Rails there is also a number of > standard strings already translated that you can simply grab from > http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale/. > > For dynamic strings that are from content pulled from the database > anyway, most plugins and gems (globalize2, etc.) store the > translations in the database. I'm actually working on a new gem that > stores the translations in MongoDB that is paired with a standard > RDBMS backed ActiveRecord (http://github.com/kete/mongo_translatable - > not yet alpha) and there are many other plugins and gems that also > work with translating dynamic content. > > You would probably get better answers asking this on the l18n specific > http://groups.google.com/group/rails-i18n?pli=1. You should also > check out http://rails-i18n.org/wiki and > http://guides.rubyonrails.org/i18n.html, too. > > Cheers, > Walter > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-t...@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- Thanks & Regards, Dhruva Sagar. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.