How can I translate form fields name in error messages?


#1

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


#2

2011/1/4 Mitchell G. removed_email_address@domain.invalid

City doit tre rempli

Mybe this help you:
http://edgeguides.rubyonrails.org/i18n.html#translations-for-active-record-models
en:
activerecord:
models:
city: city in german


#3

2011/1/5 Mitchell G. removed_email_address@domain.invalid

en:
activerecord:
models:
city: city in german

Thank you very much that is perfect

Great :slight_smile:


#4

Andrés Gutiérrez wrote in post #972249:

2011/1/4 Mitchell G. removed_email_address@domain.invalid

City doit tre rempli

Mybe this help you:

http://edgeguides.rubyonrails.org/i18n.html#translations-for-active-record-models

en:
activerecord:
models:
city: city in german

Thank you very much that is perfect


#5

Just for clarification: " City doit tre rempli" is French and not German
:wink:

2011/1/5 Andrs gutirrez removed_email_address@domain.invalid


#6

El 5 de enero de 2011 10:21, Andrs M. removed_email_address@domain.invalid escribi:

Just for clarification: " City doit tre rempli" is French and not German
:wink:

Thanks :slight_smile:


#7

On top of respond are actually ideal. They specified all answer intended
for translate form fields name in error messages.

http://www.translatebyhumans.com/