module ActsAsTranslator::InstanceMethods

Public Instance Methods

can_admin_translations?() click to toggle source

returns true if the user can admin translations

# File lib/translation_center/acts_as_translator.rb, line 16
def can_admin_translations?
  true
end
translation_for(key, lang) click to toggle source

returns the translation a user has made for a certain key in a certain language

# File lib/translation_center/acts_as_translator.rb, line 11
def translation_for(key, lang)
  self.translations.find_or_initialize_by_translation_key_id_and_lang_and_translator_type(key.id, lang.to_s, self.class.name)
end