Originally written
April 21, 2020
Updated
April 21, 2020

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.

Content

Getting started

Make sure that you have activated the LearnDash plugin along with the LearnDash LMS Multi Language plugin by navigating to PluginsInstalled Plugins.

Also, make sure that you have activated the WPML Multilingual CMS, WPML String Translation, and WPML Translation Management plugins.

Translating LearnDash elements

The translation process consists of three main parts:

  1. Translating categories and taxonomies.
  2. Duplicating LearnDash elements (courses, lessons, topics, questions, etc) to other languages.
  3. Manually translating and connecting LearnDash elements.

Translating LearnDash taxonomies

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.

Duplicating LearnDash elements

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:

  1. Navigate to WPMLTranslation Management.
  2. 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.
  3. Choose the course(s) you want to translate. 
  4. 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.
Duplicating LearnDash elements
  1. Repeat the steps 2-4 to duplicate the elements (lessons, topics, quizzes, etc) associated with the course(s) that you want to translate.

Translating and connecting LearnDash elements

Make sure to translate LearnDash elements in this exact order:

  1. Course 
  2. Lesson
  3. Topic
  4. Quiz
  5. Question 

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. 

  1. Navigate to the lessons screen and use the admin bar language switcher to choose the language you want to translate your lesson into.
  2. Click the Edit link to open the lesson editing screen. 
Navigating to the secondary language lessons screen
  1. 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.
Converting the duplicated lesson to translation
  1. Once you complete translating the lesson content, navigate to the Settings tab.
  2. Choose the translated version of the course under the Associated Course drop-down menu then click the Update button to save the translation.
Assigning the translated lesson to the translated course

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.

Translating LearnDash texts

Besides courses, lessons, and topics contents, LearnDash has global texts such as the topics navigation buttons. 

The lesson navigational buttons

To translate these texts and other texts that come from the LearnDash plugin, follow these steps:

  1. Navigate to WPMLString Translations.
  2. Search for the text that you want to translate. In this example, we translate the “Mark Complete” text.
  3. Click the translations link, add the translated text, and tick the Translation is complete checkbox. Finally, click the Save button. It is worth mentioning that you will find all LearnDash texts under the “learndash” text-domain. 
Translating LearnDash texts

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.

Searching for texts with placeholders

Translating LearnDash pages

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:

  1. 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.
  2. Duplicating and manually translating the page.

Translating LearnDash email notifications

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. 

Getting help from our support

In case you need help translating your site built using LearnDash and WPML, visit WPML’s support forum.