thx, ill try it
thanx On Sep 30, 11:44 am, iain hecker <[EMAIL PROTECTED]> wrote: > Hi again florian, > > I have made a plugin to do what you > wanted:http://iain.nl/2008/09/acts_as_translatable_model-plugin/ > > I don't know if that "include Validatable" uses the official Rails > validation, but you can include the official Rails validation too (it > requires some more work though) > > I already mentioned how to use translations for activerecord in my > other reply ;) > > -- > Iain Heckerhttp://iain.nl/ > > On Sep 30, 11:31 am, fwalter <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I am using a model which is not an ActiveRecord. > > > class ContactFormPresenter > > include Validatable > > > ATTRIBUTES = %w(name email subject comment) > > ATTRIBUTES.each { |name| attr_accessor name } > > > ATTRIBUTES.each { |name| validates_presence_of name } > > validates_format_of :email, :with => RegexCollection::EMAIL_REGEX > > > def initialize(attributes = nil) > > ATTRIBUTES.each { |name| self.send("#{name}=", > > attributes[name.to_sym]) } if attributes.is_a?(Hash) > > end > > end > > > <<<<<<<<<<<<<< > > > if i don't put the :message => > > I18n.t(:'activerecord.errors.messages.blank') , I only get the > > base_locale translation. > > > btw. I would like to translate these attributes like ActiveRecords > > Attributes. how are the keys for that? active records are: > > > de: > > activerecord: > > attributes: > > <modelname>: > > <attributename>: > > > do you have any hints for me, solving that? > > > thanks for help. > > > florian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "rails-i18n" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rails-i18n?hl=en -~----------~----~----~----~------~----~------~--~---
