Forum: Rails I18n How can I translate form fields name in error messages?

Posted by Mitchell Gould (mitch_newbie)
on 2011-01-04 16:17
Attachment: Picture_3.png (36,1 KB)
I have a form with labels that I translate using the I18n format with
YAML files.

If the user does not fill in a field properly on the form an error
message is displayed.

I have managed to set up the YAML file to translate the messages but the
name of the field in the error message does not get translated.

For example:
City doit être rempli

How to I make sure the field names are translated in the error message?

Thanks in advance.

Mitch
Posted by Andrés Gutiérrez (andresgutgon)
on 2011-01-04 16:58
(Received via mailing list)
2011/1/4 Mitchell Gould <lists@ruby-forum.com>

> City doit tre rempli
>

Mybe this help you:
http://edgeguides.rubyonrails.org/i18n.html#transl...
en:
  activerecord:
    models:
      city: city in german
Posted by Mitchell Gould (mitch_newbie)
on 2011-01-05 04:17
Andrés Gutiérrez wrote in post #972249:
> 2011/1/4 Mitchell Gould <lists@ruby-forum.com>
>
>> City doit tre rempli
>>
>
> Mybe this help you:
> 
http://edgeguides.rubyonrails.org/i18n.html#transl...
> en:
>   activerecord:
>     models:
>       city: city in german

Thank you very much that is perfect
Posted by Andrés Gutiérrez (andresgutgon)
on 2011-01-05 09:34
(Received via mailing list)
2011/1/5 Mitchell Gould <lists@ruby-forum.com>

> > en:
> >   activerecord:
> >     models:
> >       city: city in german
>
> Thank you very much that is perfect
>
Great :)
Posted by "Andrés Mejía" <andmej@gmail.com> (Guest)
on 2011-01-05 10:22
(Received via mailing list)
Just for clarification: " City doit tre rempli" is French and not German 
;)

2011/1/5 Andrs gutirrez <andresgutgon@gmail.com>
Posted by Andrés Gutiérrez (andresgutgon)
on 2011-01-05 10:35
(Received via mailing list)
El 5 de enero de 2011 10:21, Andrs Meja <andmej@gmail.com> escribi:

> Just for clarification: " City doit tre rempli" is French and not German
> ;)
>
Thanks :)
Posted by Translate Humans (translatebyhumans)
on 2012-03-26 13:54
On top of respond are actually ideal. They specified all answer intended
for translate form fields name in error messages.

http://www.translatebyhumans.com/
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.