2014-04-04 00:51:42 +02:00
|
|
|
require 'i18n/backend/active_record'
|
|
|
|
|
2014-08-10 00:26:18 +02:00
|
|
|
# https://github.com/dylanz/i18n_backend_database
|
2014-07-18 18:05:13 +02:00
|
|
|
Translation = I18n::Backend::ActiveRecord::Translation
|
|
|
|
|
|
|
|
if Translation.table_exists?
|
2014-09-20 17:20:40 +02:00
|
|
|
I18n.backend = I18n::Backend::Chain.new(I18n::Backend::ActiveRecord.new,
|
|
|
|
I18n.backend)
|
2019-11-05 22:21:48 +01:00
|
|
|
I18n::Backend::ActiveRecord.include I18n::Backend::Memoize
|
2014-07-18 18:05:13 +02:00
|
|
|
end
|