lib/will_translate/instance_methods.rb
# Loads translations for this object. Called automatically by +after_initialize+ hook.
Loads translations for this object. Called automatically by +after_initialize+ hook.
Loads translations for this object . Called automatically by + after_initialize + hook .
def load_translations
      unless @translations
        @translations = {}
        I18n.available_locales.each do |locale|
          @translations[locale] ||= {}
        end
        wt_translations.each do |translation|
          @translations[translation.locale.to_sym] ||= {}
          @translations[translation.locale.to_sym][translation.field.to_sym] = translation
        end        
      end
      @translations            
    end
def load_translations unless @translations @translations = { } I18n . available_locales . each do | locale | @translations [ locale ] ||= { } end wt_translations . each do | translation | @translations [ translation . locale . to_sym ] ||= { } @translations [ translation . locale . to_sym ] [ translation . field . to_sym ] = translation end end @translations end
Loads translations for this object.
Loads translations for this object .
# set out blanks # load actual data