module R18n::Rails::HooksHelper::ForMailer

Private Instance Methods

set_r18n() click to toggle source

Set locale from `::I18n`

# File lib/r18n-rails/hooks_helper.rb, line 72
def set_r18n
  R18n::I18n.default = ::I18n.default_locale.to_s
  i18n = R18n::I18n.new(
    ::I18n.locale, R18n.default_places,
    off_filters: :untranslated, on_filters: :untranslated_html
  )
  R18n.set i18n
end