Module: Webmachine::Translation

Included in:
Webmachine, Decision::Conneg::MediaTypeList, Decision::FSM, Decision::Flow, Dispatcher::Route, MediaType
Defined in:
lib/webmachine/translation.rb

Overview

Provides an interface to the I18n library specifically for Webmachine‘s messages.

Instance Method Summary collapse

Instance Method Details

#t(key, options = {}) ⇒ String

Interpolates an internationalized string.

Parameters:

  • key (String)

    the name of the string to interpolate

  • options (Hash) (defaults to: {})

    options to pass to I18n, including variables to interpolate.

Returns:

  • (String)

    the interpolated string



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

def t(key, options={})
  ::I18n.t(key, options.merge(:scope => :webmachine))
end