class ActiveRecord::Base def self.multilingual_field(fieldname) module_eval <<-end_eval def #{fieldname} send("#{fieldname}_\#{Locale.language.short_name}") end def #{fieldname}=(value) send("#{fieldname}_\#{Locale.language.short_name}=",value) end end_eval end end