Module: LocalizeFilter

Defined in:
lib/liquidum/liquid/filters/localize_filter.rb

Instance Method Summary collapse

Instance Method Details

#localize(input, locale = 'en', format = nil) ⇒ Object

Localize date/time See: guides.rubyonrails.org/i18n.html

Examples:

date_time | localize: ‘nl’, ‘%d %b %R’ }



10
11
12
# File 'lib/liquidum/liquid/filters/localize_filter.rb', line 10

def localize(input, locale = 'en', format = nil)
  I18n.l(input, format: format, locale: locale)
end