Module: Inflect::I18n

Defined in:
lib/inflect/i18n.rb

Overview

Responsible of internationalization logic in the app.

Class Method Summary collapse

Class Method Details

.errors(key) ⇒ String

Returns error message inside the locale file.

Parameters:

  • key (Symbol, String)

    The key to error message.

Returns:

  • (String)

    Translation of the error message.



9
10
11
# File 'lib/inflect/i18n.rb', line 9

def self.errors(key)
  Loader::locale['errors'][key.to_s]
end