mirror of
https://github.com/we-promise/sure.git
synced 2026-04-08 14:54:49 +00:00
* Add basic date and time localization * Normalize translations * Localize transaction dates * Removed unsupported Rails locales
14 lines
262 B
Ruby
14 lines
262 B
Ruby
module Localize
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
around_action :switch_locale
|
|
end
|
|
|
|
private
|
|
def switch_locale(&action)
|
|
locale = Current.family.try(:locale) || I18n.default_locale
|
|
I18n.with_locale(locale, &action)
|
|
end
|
|
end
|