I had been hunting for a wordpress plugin/jewel means to fix extend the native rails i18n for storing my translations into my database. Maybe I made use of the incorrect search phrases, but all I discovered was the data, that altering the after sales IS really possible which blog entry which descripes crafting my very own after sales.

It's difficult to assume, that individuals rails applications available getting their translations saved in yml-files or every developer authored own backends!

Are you aware working solutions with this? Storing multiline texts in yml really will get me lower! )

Thanks and greets,

Joe

I finally found things i was searching for with the aid of Sven Fuchs:

http://github.com/dylanz/i18n_backend_database/tree/master

This quite awesome wordpress plugin by Dylan Stamat does just what the title signifies and furthermore handles the caching!

Sven also pointed out, the current branch of i18n/active_record offers an ActiveRecord after sales too:

http://github.com/svenfuchs/i18n/blob/active_record/lib/i18n/backend/active_record.rb

Some discussion relating to this subject is happening within the goolge i18n user group:

http://groups.google.com/group/rails-i18n/browse_thread/thread/6b7ba3c401890a7e

Problem solved, because of Mr I18n Sven Fuchs! )

i18n has generated-in support for implementing the database like a translation after sales.

Produce a table by using this code inside a migration:

   create_table :translations do |t|
     t.string :locale
     t.string :key
     t.text   :value
     t.text   :interpolations
     t.boolean :is_proc, :default => false
   end

Adding an initializer in config/initializers/i18n.rb with contents:

   I18n.backend = I18n::Backend::ActiveRecord.new

And last... put translations within the table. Something similar to:

locale key      value
en     Cool     Cool
es     Cool     Frio
en     nav.Home home
es     nav.Home casa
...

By i18n .5. In my opinion they moved this code out into it's own jewel... I forget what that jewel is known as.

We'd a great knowledge about fast_gettext

it features a DB-backed after sales that accompany a controller to complete the translations over the internet. The caching is made-in, though we needed to code pre-loading of all the translations on boot (it's considerably faster then have them one-by-one with caching).