Can i use field validation with field translation(part of i18n) somehow?
I am using field validation for "When" field, which is a date field and when i hit the "Add another item" button i get the original field name what is "Mikor". "Mikor" field is in hungarian and i made the english translation for this that is "When".
Here is my field validation settings for "When" field: When field validation settings
So [field-name] should be replaced to the correspondig language using field tranlation. On english page it should be "When field is required.". THX
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 1960134-field_validation-translate-label-4.patch | 687 bytes | rodrigoaguilera |
| #3 | field_validation.1960134.patch | 909 bytes | NicA109 |
| when-validation.png | 20.48 KB | mibfire | |
| field-translation.png | 47.54 KB | mibfire |
Comments
Comment #1
g089h515r806 commentedCould you translate it at admin/config/regional/translate/translate?
All custom error message have been passed to t() function.
Comment #2
mibfire commentedError messages can be translated yes, but the problem is the token that is the field label what should be ran through the field translation module.
Comment #2.0
mibfire commentedlink fix
Comment #3
NicA109 commentedComment #4
rodrigoaguileraIn order to use i18n you have to call its API. Otherwise you will get the built-in interface translations instead of the translation you configured for the given field.
Patch attached.