LearnDash is an LMS plugin that allows you to build amazing educational websites. Its integration with WPML allows you to create a fully-functional multilingual educational website. In this tutorial, we walk you through the process of translating all LearnDash elements.
- Getting started
- Translating LearnDash elements
- Translating LearnDash texts
- Translating LearnDash pages
- Translating LearnDash email notifications
- Known issues with LearnDash
- Getting help from our support
Make sure that you have activated the LearnDash plugin along with the LearnDash LMS Multi Language plugin by navigating to Plugins → Installed Plugins.
Also, make sure that you have activated the WPML Multilingual CMS, WPML String Translation, and WPML Translation Management plugins.
The translation process consists of three main parts:
- Translating categories and taxonomies.
- Duplicating LearnDash elements (courses, lessons, topics, questions, etc) to other languages.
- Manually translating and connecting LearnDash elements.
LearnDash offers categories and tags for courses, lessons, and topics. To translate them, check our guide on translating taxonomies. WPML automatically assigns the translated category and tag to the translated LearnDash element.
The first step is to translate LearnDash elements is to duplicate the course(s) along with its associated lessons, topics, quizzes, and questions to the secondary language you want to translate your course into. You can do this by following the steps below:
- Navigate to WPML → Translation Management.
- Choose “Course” from the Element type drop-down menu and then click on the Filter button. You will see a list of all the courses that you have on your website.
- Choose the course(s) you want to translate.
- In the Select translation options section choose the Duplicate content option that corresponds to the languages that you want to translate your course(s) into. Then click the Duplicate button.
- Repeat the steps 2-4 to duplicate the elements (lessons, topics, quizzes, etc) associated with the course(s) that you want to translate.
Make sure to translate LearnDash elements in this exact order:
And the reason is that you want to assign each element to its translated version. For instance, when you translate a lesson, you will want to assign it to the translated version of the course. This is why you need to translate the course before translating the lesson.
In this example, we cover the steps of translating a lesson. Note that we have already translated our course to be able to assign the translated lesson to it.
- Navigate to the lessons screen and use the admin bar language switcher to choose the language you want to translate your lesson into.
- Click the Edit link to open the lesson editing screen.
- In the language box, click the Translate independently button then translate the lesson content. When translating any of LearnDash elements make sure that you don’t translate any shortcodes.
- Once you complete translating the lesson content, navigate to the Settings tab.
- Choose the translated version of the course under the Associated Course drop-down menu then click the Update button to save the translation.
Repeat the same steps to translate all the lessons associated with your course. You can follow the same steps to translate any of LearnDash elements.
It is worth noting that answers don’t get copied to the secondary language when duplicating questions.
As a workaround, you can manually add the questions’ answers in the secondary language. To do this, follow the steps below:
- Edit the question in secondary language.
- Choose the Question type.
- Manually add the translated answers.
- Make sure to link the translated version of the question to the translated version of the quiz from the Settings tab. Finally, hit the Update button to save the translation.
If you enable the shared course step, you cannot link the LearnDash elements that you have translated from the Settings tab. Instead, you need to link the elements that you have translated using the Course Builder. This is actually how LearnDash works even if you are building your site in one language.
Check out the LearnDash’s guide for detailed instructions on associating course elements using the Course Builder.
Besides courses, lessons, and topics contents, LearnDash has global texts such as the topics navigation buttons.
To translate these texts and other texts that come from the LearnDash plugin, follow these steps:
- Navigate to WPML → String Translations.
- Search for the text that you want to translate. In this example, we translate the “Mark Complete” text.
- Click the plus icon, add the translated text, and press Enter on your keyboard to save. It is worth mentioning that you will find all LearnDash texts under the “learndash” text-domain.
Some of LearnDash texts include place holders such as the “Next Topic”. To search for this text on the String Translation screen you need to search for “Next %s” and look for the “placeholder: Topic” context.
LearnDash offers shortcodes and Gutenburg blocks that allow you to insert its content on your pages. For example, you can create a page that lists all the courses on your site using the [ld_cour se_list] shortcode.
You can translate pages that include LearnDash blocks or shortcodes in two ways:
- Using WPML’s advanced translation editor. It is worth noting that the shortcodes won’t show on the translation editor screen. WPML automatically copies the shortcode to the secondary language page. We recommend this method to translate pages.
- Duplicating and manually translating the page.
LearnDash allows you to send email notifications to the website admin and the user when a user completes a quiz. Currently, WPML supports sending email notifications in the site’s default language only.
WPML works fine with this plugin, but sometimes there could be minor issues we're working on. This is expected as both plugins provide frequent updates.
In case you need help translating your site built using LearnDash and WPML, visit WPML’s support forum.