Translation


#1

Can i translate the “error” box?

See the image below:


#2

Hi Paolo - you can customize the error message using some custom javascript.

Here is an example of how you can customize the error messages for forms. The following code needs to be modified to reflect the field names of your form and the error messages you require. It then needs to be placed in the page by clicking on the “Scripts” button in the toolbar. Paste it into the dialog box and choice “Head” in the drop down menu named “Placement”. The field names are visible in the form editor just below the text input box for “Field Label”.

I hope this helps answer your question.


#3

Hi Paolo - You can certainly translate the form error messages for your page.

It will require some custom javascript to achieve but here is an example of how you can customize the error messages for forms. The following code needs to be modified to reflect the field names of your form and the error messages you require. It then needs to be placed in the page by clicking on the “Scripts” button in the toolbar. Paste it into the dialog box and choice “Head” in the drop down menu named “Placement”. The field names are visible in the form editor just below the text input box for “Field Label”.

<br /> /* Change the main error message title */
<br /> jQuery(document).ready(function() {
<br /> jQuery('#'+d.errorContainerId).find('h3').text(
<br /> "Please correct the following errors:" <br /> );
<br /> });
<br /> /* Change the individual error messages */
<br /> d.validationMessages = { "first_name": {
<br /> required: "First name is required"
<br /> },
<br /> "last_name": {
<br /> required: "Last name is required"
<br /> },
<br /> "email": {
<br /> required: "Email is required",
<br /> email: "Please enter a valid email address"
<br /> }
<br /> };
<br /> </script>```

#4

Hi Paolo - you can customize the error message using some custom javascript.

Here is an example of how you can customize the error messages for forms. The following code needs to be modified to reflect the field names of your form and the error messages you require. It then needs to be placed in the page by clicking on the “Scripts” button in the toolbar. Paste it into the dialog box and choice “Head” in the drop down menu named “Placement”. The field names are visible in the form editor just below the text input box for “Field Label”.

I hope this helps answer your question.


#5

everything works except “Please correct the following errors”.
Tomorrow i will try harder, thank you so much by the way.


#6

Hi again Paolo - when you work with your page again tomorrow, try making the following change:

The 4th line of the scripts from:
jQuery('#'+d.errorContainerId).find('h3').text(

to:
jQuery('#'+d.errorContainerId).find('div.error').text(

Hope this helps!


#7

It works! perfect!

Thank you


#8

Hi I have the same error. I follow the instructions but it doesn’t work. Could you help me?


#9

Hello, 

I’m trying to translate errors in french, but don’t work for me on http://unbouncepages.com/intellio-taxi/
is it still same javascript ?

Thanks for Help !!


#10

Hey Ilane!

It looks like you have a extra curly bracket in your code. I’d check to make sure you don’t have any extra characters.

That said we do have a updated script I recommend using instead. Checkout the article below:
http://documentation.unbounce.com/hc/en-us/articles/203799174#content8