Buy Now
Sign in

How to change validation messages to other languages

rotocal , June 10 2017, 16:00
rotocal 41
June 10 2017, 16:00 #369223
Hi Forum,

By entering alpha characters on a field that require numbers this message will displayed : "This field must be set to a number", or "Please enter a valid number"
How can be translated to spanish (where is the table of validation messages located)?
How can be a new language table added for validation messages in spanish.

Thank you all
calculus00 1
June 10 2017, 16:01 #369224
Hello rotocal,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I change the language used in Validation messages?
P.S: I'm just an automated service
I'm an automated service, my answers may help, but they may not be accurate.
rotocal 41
June 10 2017, 16:12 #369225
Already tried as per suggeted:
$lang = JFactory::getLanguage();
$tag = $lang->getTag();
$tag = substr( $tag, 0, 2 );
$this->form_params->set('jsvalidation_lang', $tag); // Not sure if it's right????

In addition I didn't find the folder:
components/com_chronoforms/js/formcheck/lang .... with the files en.js - or - es.js
rotocal 41
June 10 2017, 17:15 #369226
also tried : $this->set('jsvalidation_lang', $tag);
admin 28
June 12 2017, 16:55 #369297
Hi rotocal,

You are using the "Validation rules" box or the new switches in the latest forms update ?

You can translate any string in the form using the locales shortcode: {l:some_string} and define the value of "some_string" under the "Locales" section under the language tag you desire.

Best regards,
If your main question got answered then please mark the answer using the button!
Did you try the new ChronoForms7 ? if yes then please send us your comments!!