Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (28 sloc) 0.874 kb
# encoding: utf-8
$:.unshift '/Volumes/Users/sven/Development/projects/i18n/cldr/lib'
require 'cldr'
module I18n
module Backend
module Cldr
include ::Cldr::Format
def localize(locale, object, format = :default, options = {})
case object
when ::Numeric
format(locale, object, { :as => :number }.merge(options))
else
super
end
end
protected
def lookup_number_format(locale, type, format)
I18n.t(:"numbers.formats.#{type}.#{format || :default}.pattern", :locale => locale)
end
def lookup_number_symbols(locale)
I18n.t(:'numbers.symbols', :locale => locale)
end
def lookup_currency(locale, currency, count)
I18n.t(:"currencies.#{currency}", :locale => locale, :count => count)
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.