Forums

How to change validation messages to other languages

rotocal 10 Jun, 2017
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
rotocal 10 Jun, 2017
Already tried as per suggeted:
<?php
$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 10 Jun, 2017
also tried : $this->set('jsvalidation_lang', $tag);
Max_admin 12 Jun, 2017
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,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.