Module: Ukrainian

Extended by:
Ukrainian
Included in:
Ukrainian
Defined in:
lib/ukrainian.rb

Instance Method Summary collapse

Instance Method Details

#init_i18nObject



15
16
17
# File 'lib/ukrainian.rb', line 15

def init_i18n
  I18n.load_path.unshift(*locale_files)
end

#pluralize(n, *variants) ⇒ Object

Raises:

  • (ArgumentError)


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