fbpx
Skip to content
Questions & AnswersCategory: QuestionsHi Dave, can you help me code the translation of hardcode text in newsletter form fields (squarespace)?
Philippe asked 5 years ago
jQuery('.newsletter-form-field-element.field-control input[type=text]').attr('placeholder', 'imiex'); // **** TRANSLATE THIS TEXT TO YOUR LANGUAGE **** First Name, Last Name, Email Address
Philippe replied 5 years ago

Dave, it’s ok now. I have found a solution, here the code:
jQuery(‘.newsletter-block .newsletter-form-field-wrapper.first-name input[type=text]’).attr(‘placeholder’, ‘Prénom’); // **** TRANSLATE THIS TEXT TO YOUR LANGUAGE ****
jQuery(‘.newsletter-block .newsletter-form-field-wrapper.last-name input[type=text]’).attr(‘placeholder’, ‘Nom’); // **** TRANSLATE THIS TEXT TO YOUR LANGUAGE ****
jQuery(‘.newsletter-block .newsletter-form-field-wrapper.email input[type=text]’).attr(‘placeholder’, ‘Adresse email’); // **** TRANSLATE THIS TEXT TO YOUR LANGUAGE ****

I have another problem with this translation:

jQuery(‘ form-item field email required error .field-error’).replaceText(/Email is not valid. Email addresses should follow the format [email protected]./gi, “L’email n’est pas valide. Les adresses de courriel doivent suivre le format [email protected] .”); // **** TRANSLATE THIS TEXT TO YOUR LANGUAGE ****

Can you help in this case?

Merci
Philippe

Philippe replied 5 years ago

Hi Dave, it works now, here is the right code :

jQuery(‘.form-item.field.email.required.error .field-error’).replaceText(/Email Address is not valid. Email addresses should follow the format [email protected]./gi, “Die Email Adresse scheint ungültig zu sein .”); // **** TRANSLATE THIS TEXT TO YOUR LANGUAGE ****

Can you correct this in your example, it would be nice for all the other Multilingualizer user’s. Thank you Philippe

1 Answers
answered 5 years ago

Hey Philippe, 
sorry that we couldn’t get back to you around the weekend. I am glad that your problem was resolved even without our help – we will make sure to update the example accordingly with what you’ve showed us here. Thank you very much, do not hesitate to contact us again with any issues you might be having – I’ll make sure to help you ASAP.

Philippe replied 5 years ago

Salut Vas,

Thank you for your reply. Here is another code ligne, this one concerns the contact form when Email Adress not valide (not the same as in the newsletter form) : jQuery(‘.form-item.field.email.required.error .field-error’).replaceText(/ is not valid. Email addresses should follow the format [email protected]./gi, ” n’est pas valide, merci de la corriger.”); // **** TRANSLATE THIS TEXT TO YOUR LANGUAGE **** A bientôt Philippe

We use cookies

We use cookies for various things on our site, including our on-site chat bubble (if you use it), our comment forms (if you use them) and for session handling (if you log in).

Other than that, we use cookies to identify where traffic came from to help us understand which traffic turns into sales, we use a cookie for Google Analytics traffic analysis and we use a cookie to customise adverts for our own products we think you'll be interested in.

You can read more detail in our privacy policy page. Please click 'Accept' or 'Decline' to continue.