Error messages in other language

  • 21 July 2015
  • 7 replies
  • 24 views

Is there any way I can get error messages in another language? You see, my LP is in portuguese, but the error messages are all in english link “must input a valid e-mail”


7 replies

Hi Mario,

I had the same problem last week, but with Spanish.  Here is what I found worked for me:

Modify Validation Errors Script - put this in Javascript before body end tag changing the language of course.

Unbounce had an article here that seems to not be working : http://support.unbounce.com/entries/21734279-How-do-I-modify-the-form-validation-error-messages-

Additionally add this CSS to Customize Visual Error Message Style:



  /* The title bar */
  .lp-form-errors div.content div.error{
    background-color: deepskyblue;
    color: white;
  }

  /* The list of errors */ 
  .lp-form-errors div.content ul{
    background-color: lightblue;
    color: white;
  }

  /* The whole box */ 
  .lp-form-errors div.content{
    border: 1px white;
  }
 

You can play around with the colors i.e. change light blue to orange, to see which looks best for your respective landing page.

Hope that helps,

Joe

Below is the same javascript, but with English in case Spanish does not work for you:

<br /> <br /> (function(e){function t(){var t=window.module.lp.form.data;var n=t.validationMessages;var r=t.validationRules;this.changeTitle=function(n){e(function(){e("#"+t.errorContainerId).find("div.error").text(n)})};this.changeField=function(e,t,i){if(!n[e])return;n[e].required=t;if(i&&r[e].email)n[e].email=i;if(i&&r[e].phone)n[e].phone=i}}window.errors=new t(lp.jQuery)})(lp.jQuery) <br />

<br /> // Change the title bar of the validation error box <br /> errors.changeTitle("Please fix these issues:"); <br />

<br /> // Change the error text for specific fields. The first message is shown when nothing is <br /> // entered and the second is shown when an invalid email/phone number is entered. <br /> errors.changeField("name", "You forgot to enter your name!"); <br /> errors.changeField("email", "You forgot to enter an email address!", "That doesn't seem to be a valid email!"); <br /> errors.changeField("phone_number", "You forgot to enter a phone number!", "That doesn't seem to be a valid phone number!"); <br /> <br />

Great man! It worked fine.
Thankx a lot!

Joe, you’re a lifesaver! 

Glad I could be of help, Mario!  Unbouncers have to stick together 🙂 and thanks for the love, Justin! 

Hi! 

Do you know how can I add a close button to the error message box? Or that is visible for only a few seconds? 

Thanks! 

Reply