Sha256: 6ca16f0895ccf510b752c1cf78c3082b17c98715b6e94bad875f9fd2e153c565
Contents?: true
Size: 678 Bytes
Versions: 5
Compression:
Stored size: 678 Bytes
Contents
require 'set' require 'i18n' I18n.enforce_available_locales = true if I18n.respond_to?(:enforce_available_locales) I18n.config.load_path << File.expand_path("../locale/en.yml", __FILE__) module Webmachine # Provides an interface to the I18n library specifically for # {Webmachine}'s messages. module Translation # Interpolates an internationalized string. # @param [String] key the name of the string to interpolate # @param [Hash] options options to pass to I18n, including # variables to interpolate. # @return [String] the interpolated string def t(key, options={}) ::I18n.t(key, options.merge(:scope => :webmachine)) end end end
Version data entries
5 entries across 5 versions & 1 rubygems