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

- (String) t(key, options = {})

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



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

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