class R18n::Locales::Hu
Hungarian locale
Public Instance Methods
format_integer(integer)
click to toggle source
# File lib/r18n-core/locales/hu.rb, line 34 def format_integer(integer) str = integer.to_s str[0] = '−' if integer.negative? # Real typographic minus group = number_group # only group numbers if it has at least 5 digits # http://hu.wikisource.org/wiki/A_magyar_helyes%C3%ADr%C3%A1s_szab%C3%A1lyai/Az_%C3%ADr%C3%A1sjelek#274. if integer.abs >= 10_000 str.gsub(/(\d)(?=(\d\d\d)+(?!\d))/) do |match| match + group end else str end end
pluralize(_number)
click to toggle source
# File lib/r18n-core/locales/hu.rb, line 30 def pluralize(_number) 'n' end