Like Polylang, WPML is a popular plugin for creating a multilingual WordPress site. However, unlike Polylang, WPML is a premium plugin that you will need to purchase.
Please note that WPML does not automatically translate content for you. If you like, you can use Translation Management to help with that, although there are extra costs associated with this plugin.
Configure WPML to Work With Sensei LMS
In this tutorial, we’ll assume that we’ve already created a course and some lessons in English, and we want to translate them to Spanish.
WPML Installation & Setup
- After installing WPML, click the Configure WPML button:
- In the first step of the setup wizard, we need to specify the default language that our content has been written in. In our case, since we’ve already written our course and lessons in English, that’s the language we select from the dropdown before clicking Next:
- Next, we select the languages we are planning to translate our content into. English is already selected by default, so we just need to check the Spanish box and then click Next:
- To enable your visitors to switch to a different language, you will need to add a language switcher to your site. You can add it in a number of different ways: as part of a menu, as a widget, or in your site’s footer. In this case we’ll add it to the main menu, so we click on the Add a new language switcher to a menu button in the Menu language switcher section:
- A pop-up appears where we can configure a variety of options. At a minimum, you will need to select the name of the menu that the switcher will be added to from the Menu dropdown. You can try out the different settings until you get the switcher looking just right in the Preview box. Once you are satisfied with how it looks, click Save to close the pop-up, and then click the Next button:
- Proceed through the Compatibility and Registration steps of the wizard.
- On the final Recommendations step, WPML suggests some additional translation plugins. Although translations will work just fine without installing more plugins, String Translation is necessary if you’d like to translate the More link text and Email Footer Text from the Sensei LMS settings. Translation Management enables you to work with a team of translators or translation services so that you don’t have to translate your content by yourself, although there is an additional cost for this service.
Now you need to translate your content. If you are not using the Translation Management plugin, the easiest way to create a translated version of an existing course is to go to Courses > All Courses. Click on the All languages link. You should now see columns for both languages:
To add a Spanish translation for the course, click the + icon below the Spanish flag. This will create a new course, with the Language setting already correctly set to the translated language. You can now get to work translating the course, and then repeat this process for lessons, questions or any other type of content you’d like to translate. When translating lessons, don’t forget to assign it to the translated course!
Now when you visit your site and select a different language using the language switcher, the page will update to show the translated content.