Module: Traducto::Helpers

Defined in:
lib/traducto/helpers.rb

Overview

************************************************************************************* Methods that will be inserted in the ActionView. *************************************************************************************

Instance Method Summary collapse

Instance Method Details

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



5
6
7
8
9
# File 'lib/traducto/helpers.rb', line 5

def t(key, options={})
  @traducto ||= Traducto::Base.new(self)

  return @traducto.translate(key, options)
end

#use_translations_of(action) ⇒ Object



11
12
13
14
15
# File 'lib/traducto/helpers.rb', line 11

def use_translations_of(action)
  @traducto ||= Traducto::Base.new(self)

  @traducto.add_action action
end