Module: Alchemy::TranslationHelper

Includes:
GettextTranslations, RailsTranslations
Defined in:
app/helpers/alchemy/translation_helper.rb

Constant Summary

Constants included from RailsTranslations

RailsTranslations::TRANSLATIONS

Constants included from GettextTranslations

GettextTranslations::TRANSLATIONS

Instance Method Summary collapse

Instance Method Details

#get_string(text_key) ⇒ Object



10
11
12
13
14
15
16
# File 'app/helpers/alchemy/translation_helper.rb', line 10

def get_string(text_key)
  if respond_to?(:_)
    return _(TRANSLATIONS[text_key])
  else
    return I18n.t TRANSLATIONS[text_key]
  end
end