Ninja Forms is an intuitive drag-and-drop form builder that helps you add front-end forms to your WordPress site in minutes. In this tutorial, we walk you through the process of creating multilingual forms using Ninja Forms and WPML.
|Default language form||Secondary language form|
- Getting started
- WPML translation tools
- Creating and translating your forms
- Getting help from our support
If you are a developer, ensure that the Ninja Forms plugin is activated.
To get started, also make sure that the following plugins are activated: WPML Multilingual CMS, WPML String Translation, WPML Translation Management, and the Ninja Forms Multilingual add-on plugin.
If you own a website and are working with a developer, please ask for the developer’s assistance in managing these settings.
WPML’s Getting Started Guide helps you set up WPML in a few minutes. Later, you will want to refer to some of its subtopics, such as Translation Management. We recommend that you keep this guide open while following this tutorial.
WPML offers two translation editors you can use for translating your site’s content:
- WPML classic translation editor (CTE).
- WPML advanced translation editor (ATE) offers automatic translation, a glossary, spell checker, and more!
Besides translating your site content yourself, you can also:
- Send your content for translation to a professional translation service.
- Create your own team of local translators from the Translation Roles tab in Translation Management and assign translation jobs to them.
To translate your forms we will use WPML Advanced Translation(ATE) and use the following steps:
- Activate ATE:
- Create the form in the default language.
- Translate the form.
- Insert the form shortcode into a post, page, or widget in the default language.
- Translate the post, page, or widget that holds the form.
To create the default language form, go to Ninja Forms → Add New. In this example, we will use the “Contact Us” form template. Of course, you can use a blank template and build your form from scratch.
You can customize the form by editing the fields’ label names and adding more form fields. Once done, click the Publish button. Check out the Ninja Forms guide on building a form.
To translate your form, follow these steps:
- Go to the WPML → Translation Management page.
- In the Select items for translation section, select Ninja Forms from the Element type drop-down menu then click the Filter button.
- Use the checkboxes to select the forms that you want to translate.
- In the Select translation options section, choose the Translate option corresponding to the language(s) you want to translate your forms into.
- Click the Add selected content to translation basket button. In this example, we will translate the contact form into Spanish.
- Now, navigate to the Translation Basket tab and click the Send all items for translation button.
- You can take a translation job by going to the WPML → Translations page. There, click the Take and translate button.
This will open the translation editor page. We recommend using WPML’s advanced translation editor.
- Click the Translate automatically button to let the editor translate contents using machine translation.
- Make sure that you copy the merge tags to the secondary language translation field as translating these tags might result in breaking the form functionality in the secondary language. Once done, click the Finish button then the Complete button to publish the translation.
You can translate all parts of your forms including the field labels, submit button text, the confirmation message, and the notification email. We are actively working on improving this.
After creating and translating your form it is time to add its shortcode to a page, post, or a widget. In our example, we created a new page in English and used the Ninja Forms block to add our form.
Finally, translate the page, post, or widget that includes your form. You can do that by clicking the plus icon corresponding to the language you want to translate your page into in the language box.
On the translation editor page, make sure to translate the page content only and not the form shortcode. Ensure copying the form shortcode into the secondary language translation field. WPML will automatically display the form in the correct language.
We have supporters in our forum who are ready six days a week to help you. They are trained in how to use WPML with Ninja Forms.
If you are setting up the site and WPML yourself, please use our Technical support forum.