instance method
store_translations
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
store_translations(locale, data, options = {})
No documentation comment.
Parameters
-
localereq -
datareq -
optionsopt = {}
Source
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/active_record.rb, line 22
def store_translations(locale, data, options = {})
escape = options.fetch(:escape, true)
flatten_translations(locale, data, escape, false).each do |key, value|
Translation.locale(locale).lookup(expand_keys(key)).delete_all
Translation.create(:locale => locale.to_s, :key => key.to_s, :value => value)
end
end
Defined in activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/active_record.rb line 22
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in I18n::Backend::ActiveRecord::Implementation