Module: I18n::Backend::Sequel::Implementation
Instance Method Summary collapse
Instance Method Details
#available_locales ⇒ Object
14 15 16 |
# File 'lib/i18n/backend/sequel.rb', line 14 def available_locales Translation.available_locales end |
#store_translations(locale, data, options = {}) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/i18n/backend/sequel.rb', line 18 def store_translations(locale, data, = {}) escape = .fetch(:escape, true) flatten_translations(locale, data, escape, false).each do |key, value| Translation.locale(locale).lookup((key)).delete_all Translation.create(:locale => locale.to_s, :key => key.to_s, :value => value) end end |