translating fieldnames in errormessages [message #714] |
Mon, 26 March 2007 07:43 |
janalwin
Messages: 17 Registered: May 2006 Location: Groningen
|
Junior Member |
|
|
The fieldnames that appear in the errors from the validation-class aren't translated at the moment. You get the name of the databasefield.
For example a dutch user will get an english name in the error and that can be confusing.
I changed the validationclass in a few places in this way:
$translated_fieldname=getLanguageText($fieldname);
$this->errors[$fieldname] = getLanguageText('sys0021', $translated_fieldname, $size);
Now I can put the translations of the fieldnames in the language file and the problem is solved.
Maybe something to integrate in the next release? Or is there a better solution?
|
|
|
|
|