def translated_attr_accessor(name)
      define_method(:"#{name}=") do |value|
        write_attribute(name, value)
      end
      define_method(name) do |*args|
        read_attribute(name, {:locale => args.first})
      end
      alias_method :"#{name}_before_type_cast", name
    end
def translated_attr_accessor(name)
      define_method(:"#{name}=") do |value|
        write_attribute(name, value)
      end
      define_method(name) do |*args|
        read_attribute(name, {:locale => args.first})
      end
      alias_method :"#{name}_before_type_cast", name
    end
Generates accessor methods for translated attributes