Roman Hausner wrote in post #160733:
> How can one change the messages that are shown in the flash for
> validates... to different languages?
Hi ,
Me too come across a situation like getting validation messages in
different languages .And done that successfully.
Here is an example :
/app/config/locales/models/en.yml
# Models
en:
activerecord:
errors:
models:
Modelname:
blank: "FirstName cannot be blank!"
Similarly create a file for other language with blank message in
different lang.
And in your model for eg
you r having a
validates_presence_of :fieldname1
By default validates_presence_of gives you the message as cant be blank
which is now will be replaced by "FirstName cannot be blank!"
(customised)
-- Aruna
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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/rubyonrails-talk?hl=en.