instance method
lookup_format
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
lookup_format(locale, type, format)
No documentation comment.
Parameters
-
localereq -
typereq -
formatreq
Source
# File activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/cldr.rb, line 67
def lookup_format(locale, type, format)
key = case type
when :date, :time, :datetime
:"calendars.gregorian.formats.#{type}.#{format}.pattern"
else
:"numbers.formats.#{type}.patterns.#{format || :default}"
end
I18n.t(key, :locale => locale, :raise => true)
end
Defined in activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/cldr.rb line 67
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in I18n::Backend::Cldr