Module: Ukrainian
Instance Method Summary collapse
Instance Method Details
#init_i18n ⇒ Object
15 16 17 |
# File 'lib/ukrainian.rb', line 15 def init_i18n I18n.load_path.unshift(*locale_files) end |
#pluralize(n, *variants) ⇒ Object
9 10 11 12 13 |
# File 'lib/ukrainian.rb', line 9 def pluralize(n, *variants) raise ArgumentError, "Must have a Numeric as a first parameter" unless n.is_a?(Numeric) I18n.backend.send(:pluralize, :uk, {:one => variants[0], :few => variants[1], :many => variants[2], :other => variants[3] || variants[2]}, n) end |