Localize the labels of the form Captcha control

This blog post comes as a resolution to the Sitefinity feature request Form Captcha control localizable.

Sitefinity provides a way to localize your site in as many language versions as required. By using Sitefinity’s multilingual support you can localize pages, content items, taxonomies, and so forth. Thus, you can address your site’s international audience and target a greater number of users. Forms module also supports translation for different languages.

Imagine that you would like to create a Subscription page via the Forms module in Sitefinity. To prevent bots and vulnerability, one of the best approaches is to add captcha control in the subscription form. This could be achieved easily following the blog post from Sitefinity here. Next, you can easily localize all fields in the form and the page where the form is dropped. Read the different topics in Sitefinity documentation regarding Multilingual environment.

Defining the problem

See an example of same Subscription form in English and French:

EN:

FR:

Notice that the labels that are part of the captcha control are not translated in French.

Desired result

FR

Follow the steps below to have the labels of the RadCaptcha control translated.

Solution

  1. From Sitefinity's backend go to Content -> Forms

  2. Create new translation of the form in French.

  3. Click to Edit the Captcha field and access designer properties.

  4. Find the ErrorMessage property and enter the translation of
    "Invalid code, please try again" in French: "Code non valide, se il vous plaît essayer à nouveau"

  5. Find the CaptchaTextBoxLabel and enter the translation of "Type the code from the image" in French: "Tapez le code fom l'image".

  6. Save the Form control designer changes.

  7. Publish the form translation.

Now whenever you go to view the page in French, the form control will be displayed fully translated.

Veronica Milcheva

About Veronica Milcheva

I am a passionate Sitefinity blogger, developer and consultant. In my spare time I enjoy running and listening to music. My personal quote: There's no tough problem, just not enough coffee :)

View Comments

comments powered by Disqus