Overview
This page explains how to create a multilingual course with WPML. WPML stands for WordPress Multilingual, and it is a plugin that site owners can use to create multilingual sites. The suggestions in this guide only apply to sites that use or plan to use the WPML plugin.
Getting Started
Start by installing and activating the WPML plugin:
- Please ensure you follow the setup steps and activate your license.
- We assume that you’ve installed the following WPML plugins:
Translate Pages
Translate the following Sensei pages:
- Courses
- My Courses (please refer to the My Courses Page section below)
- Course Completed
Create Question Categories
If you would like to have reusable question categories, create them in advance and add them to the quizzes before translating the course:
- Go to Sensei LMS -> Questions -> Question Categories.
- Create a new question category.
- Go to Sensei LMS -> Questions.
- Create questions and attach them to the category you created in step 2.
Create a Course
Create a course as you normally would:
- Add a Course Outline block with lessons.
- Add content to those lessons.
- Add quizzes with questions to the lesson.
- If you have question categories, add them to the quizzes as well.
Translate the Course
Next, follow these steps to translate the course:
- Go to Sensei LMS > Courses and find the course you would like to translate.
- Click on the plus icon in the translation column for the language you want to translate into.
- Translate the strings using the WPML translation editor.
- When you return from the WPML editor, you will see a circle arrow icon appear in place of the plus icon. It means the translation process is in progress.
- When the pencil icon appears, the translation process has finished and the following actions were taken:
- It created a translated version of the course post.
- It also created post duplicates for lessons, quizzes and questions. The content of these posts remain in the original language and ready for translation. However, this process depends on the presence of a quiz in a lesson.
- Even though you set translations for lesson titles, in the course outline of the translated course they remain in the original language, as it is using real data from the lessons.
- Now go to Sensei LMS > Lessons. Use the WPML translation editor to translate the lesson:
- Find the original lesson and click on the pencil icon for the language you want to translate into.
- If you had a quiz in the lesson, questions remain untranslated even if you translated strings for them. Make sure you translate the questions in the next step.
- Go to Sensei LMS > Questions and translate the questions.
- Find the original question and click on the pencil icon for the target translation language.
- Use the WPML editor to translate all strings.
Disable Sensei Slugs Translation
If you translated a course, but you get a 404 page when you try to open the course on the frontend, you need to disable translating Sensei slugs:
- Go to Sensei LMS > Settings > WPML. This tab is visible only when WPML is activated on your website.
- Check the Don’t translate Sensei slugs option and click “Save Changes”.
- Try to open the translated course again.
Question Feedback
If you have a quiz with questions in your lesson, enable Hide Answer Feedback for each question. This feature is not yet supported in translated quizzes.
Shared Student Progress and Grading
Student progress is associated with the original (i.e. non-translated) course. When grading quizzes, be sure to switch to the original language by using the language switcher in the admin top bar. If it’s set to another language, it won’t be possible to grade the quiz.
It’s best to be consistent by always having the language switcher set to the original language in order to minimize any confusion in the future.
My Courses Page
In the latest version of Sensei LMS, the Course List block is used to display user courses. However, given this block is not yet compatible with WPML, you will need to replace it with a shortcode.
Create a translation of the page and replace its content with the [sensei_user_courses] shortcode.
Troubleshooting
If you followed this document but are still experiencing issues with course translation, try the following steps:
- Check WPML -> Settings -> Translation Editor and ensure that the WPML translation editor option is selected.
- If you have any other plugins besides Sensei LMS and WPML activated, try disabling them in order to check for a plugin conflict.