Method: Humanize.for_locale
- Defined in:
- lib/humanize/module.rb
.for_locale(locale) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/humanize/module.rb', line 30 def for_locale(locale) case locale.to_sym # NOTE: add locales here in alphabetical order when :az, :de, :en, :es, :fr, :id, :ms, :pt, :ru, :vi [Object.const_get("Humanize::#{locale.capitalize}"), ' '] when :th [Humanize::Th, ''] when :tr [Humanize::Tr, ' '] when :jp [Humanize::Jp, ''] when :'zh-tw' [Humanize::ZhTw, ''] when :'fr-CH' [Humanize::FrCh, ' '] else raise "Unsupported humanize locale: #{locale}" end end |