Module: Bridgetown::Filters::TranslationFilters
- Included in:
- Bridgetown::Filters, Tags::TranslationTag
- Defined in:
- bridgetown-core/lib/bridgetown-core/filters/translation_filters.rb
Instance Method Summary collapse
Instance Method Details
#t(input, options = "") ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'bridgetown-core/lib/bridgetown-core/filters/translation_filters.rb', line 6 def t(input, = "") = string_to_hash() locale = .delete(:locale) count = .delete(:count) [:count] = count.to_i unless count.nil? I18n.t(input.to_s, locale:, **) rescue ArgumentError input end |