An incredible aspect of WordPress is that it is widely used throughout the world to create all types of successful websites. Due to its worldwide popularity, there is a growing need for its subjects and modules to be internationalized so that the platform can adapt to different languages. Multilingual reach is a growing need for many instructors, looking to translate LearnDash courses, in the e-learning industry.
Crossing language barriers is especially important for e-learning site owners, looking to impart courses and lessons in different languages. If you are looking to translate LearnDash LMS into a different language, today’s post will help you set up LearnDash translation.
Tools You Can Use To Translate LearnDash Courses
LearnDash Multilingual Integration Add-on
To install and use the Add-on, just follow these installation steps and set up any of the two core plugins mentioned above:
- To get started download the Multilingual Add-on file
- In your WordPress admin area, navigate to Plugins and select Add New
- Locate the LearnDash Multilingual add-on
- Click Install Now
- Click the Activate Plugin button
WPML is a WordPress plugin that helps you turn your site into a multilingual site. With this translation plugin, you can translate pages, posts, custom types, taxonomy, menus, and your site’s theme texts. As an additional benefit, WPML offers great compatibility and can work with every theme or plugin using the WordPress API. With the Learndash Multilingual Integration Addon, the transition is even smoother.
To initially set up this plugin, follow these steps:
- Start by downloading WPML main components.
- Log in to your online learning site’s WordPress and navigate to the Dashboard.
- Select Plugins and then click on Add New.
- Upload the downloaded zip files and click on Install Now.
- After installation, activate the plugin.
- Next, follow the steps on the setup wizard to select your site’s languages and customize language switchers in your site.
Polylang allows you to create a bilingual or multilingual WordPress site. After you create a post, page or lesson and create categories and post tags as usual, you can define the language you want to use for each. This way you have total control about which of your course content gets translated and which is kept in its original language. You can also alternate into as many languages as you need, included RTL languages. For your comfort, WordPress language packs are automatically downloaded and updated.
To install this compatible LearnDash translation plugin follow these steps:
- From your site’s WordPress dashboard, navigate to Plugins
- Select Add New
- Use the search bar to look up “Polylang” and select the desired plugin
- Click on install and then activate the plugin
- A setup wizard will emerge to help you set up the plugins main features
- In the language section, you can select which languages to use from over 90 predetermined options. Keep in mind that the first language selected will be used as your website’s default language.
PoEdit is a useful piece of software available for free that can help you create and edit translation files for your LearnDash site. Since LearnDash is in English, it has user-donated translations in its code. Strings from code in the LearnDash codebase are translatable though, with the help of programs like PoEdit.
To translate these strings of code translatable texts are extracted and compiled in a master PO file. The PO file is translated into different languages, resulting in an alternative file for each language.
This program’s features provide translators with an easy to use editor for gettext. To further increase efficiency PoEdit includes functions such as pre-translation and machine translation.
If you have to refresh a translation in your LearnDash site, you can do as such by following these steps:
- Navigate to LearnDash LMS > Settings > Translations
- Download the most recent POT document by tapping the POT download button.
- Download the .po document by tapping the PO download button.
- Open the .po document with PoEdit
- Make your additions as well as changes to the interpretation document
- Save the .po record
- Recover the new .mo record through File> Compile to Mo
- Utilizing a FTP program or File Manager, add your new .mo and .po records to the /wp-content/dialects/modules/organizer
As an alternative to using the PoEdit software, you can use Loco Translate plugin to edit your LearnDash translation files within your browser. With this plugin, you can create and edit your language files directly from your WordPress admin. Additionally, the plugin is also equipped to extract translatable code strings from your original source code for translation.
You can use this guide to learn more about using the Loco Translate plugin to translate your LearnDash LMS site theme.
A Translation Example With Loco Translate
If you want a clearer look at how to use Loco Translate for your LearnDash translations to take a look at this example for Spanish translations:
- Get started by selecting Plugins from your WordPress Dashboard and then selecting Add New.
- Using the search bar look up “Loco Translate” and then download the corresponding plugin by selecting Install Now.
- Once installation is complete click on the Activate button. Next, the Loco Translate menu will be added to your WordPress Dashboard.
- To add a translation for the LearnDash plugin with Loco Translate, navigate to Loco Translate from the dashboard, and then select Plugins. Then click on the New Language button. This will make a vacant .po record for the interpretation.
- To get the writings to translate press the “Rescan” button for the language. That will filter your module records searching for text. Then press the Edit button so you can begin translating.
- Next click on the “create mo-record” button inside the Edit area to convert your .po document into a .mo file.
What Translations Are Supported By LearnDash?
Currently, LearnDash supports the following translations:
- Arabic (ar)
- Chinese (zh_CN)
- Danish (da_DK)
- Dutch / Nederland (nl_NL)
- French (Canada) (fr_CA)
- French (France) (fr_FR)
- German (de_DE)
- Hebrew (he_IL)
- Italian (it_IT)
- Polish (pl_PL)
- Portuguese (Brazil) (pt_BR)
- Russian (ru_RU)
- Spanish (Spain) (es_ES)
- Swedish (sv_SE)
- Right-to-left (RTL) languages are supported.
Translate LearnDash LMS to RTL Languages
There are a number of people who use RTL language on their websites. Learndash flexibly allows the users to use this RTL format in every course they offer. It meets the needs of RTL language-speakers with support for languages like Arabic, Hebrew, Urdu, Persian, and more. Furthermore, every piece of content can be translated. It is widely compatible with the leading page builders along with the comprehensive documentation and timely support for its users.
LearnDash is compatible with almost all WordPress themes. But, out of these, LearnDash is better suited with themes specifically built for the LMS plugin. LearnDash themes are a much smaller set than WordPress themes. And, out of LearnDash-specific themes, the themes that support RTL are even fewer in number.
Setting Up RTL Translation In WordPress
WordPress will load the rtl.css file after it loads the normal styles.css, so the RTL CSS file only needs to override attributes that need to change. This means that the rtl.css file is usually pretty small, for most themes. The ‘direction’ attribute in CSS tells the browser the direction of the page. For RTL languages, you want to set it to ‘rtl’. There’s another ‘magic’ attribute that you should set for proper RTL display. It’s called ‘unicode-bidi’. That ‘magic’ attribute is pretty simple to understand when you’re used to writing in RTL. It controls the way characters are displayed inside the line.
For proper RTL display, add the following to the .body selector:
If users use a CSS generator tool, users will now need to enqueue new style-rtl.css stylesheet so WordPress can load it in at the appropriate time. This is just a matter of adding a snippet to your theme’s functions.php file:
Tips To Prevent Common Issues
Make Sure You Work With An Updated Pot File
Attempting to translate your LearnDash site from an outdated translation file will lead to translation changes failing to be made. Make sure you download the latest pot file and then modify that file accordingly for the best results.
Select The Right Locale
In some cases, languages have different versions, like for example with the Spanish language from Mexico and Spain. You have to be especially cautious to select the right file since each version will have its own and will be considered as its own language by WordPress. If your LearnDash site localization is set to, for example, es_MX, then that setting will not pull any information from your es_ES translation files, even if generally speaking they are the same language.
Correctly Name and Save Your File
To avoid issues with incorrect file names or folders to ensure your LearnDash translation files are in the following folder path, with the file names that include locale code, as seen here:
You should also ensure your hyphens and underscores are in the right places, as seen here:
Bottom Line[bctt tweet=”Are you running a LearnDash site created for a multilingual audience? Check out this tutorial to seamlessly manage translations on your website and make your site friendly for all.” via=”no”]
Running a multilingual LearnDash site with translations used to be a challenging task. However, new tools such as the ones mentioned above have made the process easier to achieve. For more assistance setting up and configuring translations for your LearnDash website, contact the WooNinjas team.