LearnDash is in English and has user-donated translations. Strings in the LearnDash codebase are translatable.
Table of Contents
- 1 Current Translations
- 2 Adding (or Modifying) a Translation
- 3 Common Issues
As the translations are user-donated, they may not be 100% complete for your desired language.
- 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.
Adding (or Modifying) a Translation
If you are creating a new translation, you can reference this helpful list of WP Locale Codes for file naming conventions.
If you need to update a translation, you can do so by following these steps:
- Navigate to LEARNDASH LMS > SETTINGS > TRANSLATIONS
- Download the latest
POTfile by clicking the POT download button (it will automatically download)
- Download the
.pofile by clicking the PO download button (it will open in a new tab)
- Right click & save the file
- Open the
.pofile with PoEdit
- Navigate to CATALOG > UPDATE FROM POT and select the downloaded POT file in step 3
- Make your additions and/or modifications to the translation file
- Save the
- Regenerate the new
.mofile via FILE > COMPILE TO MO
- Using an FTP program or File Manager, add your new
.pofiles to the
Verify that the file is named correctly and in the proper directory. If one or both of these is incorrect then you will encounter issues.
Not Updating from Latest POT File
If you are translating strings such as “Next Lesson” and noticing that the translation is not reflected on your site, then that is because you are translating from an out of date POT file.
The string in the codebase of LearnDash is actually “Next %s” because the %s acts as a placeholder for your Custom Label (even if you do not use Custom Labels).
This may also be why you notice that all of a sudden you have “lost” translations of strings like “Next Lesson” and “Previous Course” and other strings that contain a custom label. However, the translation is not necessarily lost. It is no longer used because the codebase is now using placeholders in those strings, not the literal words such as Lesson or Course.
To resolve, download the latest POT (step #2), then follow steps 6-10 to update from the latest POT, add translations for the new strings as needed, and upload your new .mo/.po files to the right place.
Translations Set to “Needs Work”
Be mindful of “Needs Work” settings on individual translations. This is typically indicated by an orange color, and an orange toggle after selecting the individual translation in poEdit.
When “Needs Work” is set on a translation, you are telling WordPress that you are not sure that this is the correct translation. Therefore, WordPress does not display this translation on your site because it thinks the translation “Needs Work” as per your instructions.
To resolve, toggle the “Needs Work” setting to off. It should look like similar to the screenshot below.
Then, save your new .mo/.po files and upload as per step 10 in the above documentation.
WordPress translations may be localized to a particular region. For example,
es_ES would be Spanish in Spain, and
es_MX would be Spanish in Mexico.
As far as WordPress is concerned, these are totally different languages (technically, referred to as “localizations”).
If your WordPress site localization is set to
es_MX, then that setting will not pull any information from your
es_ES translation files (even though to you, the differences in language may be minor).
Please ensure your LearnDash translation files are in the folder path below, with the file names that include locale code. For example:
It is not a good idea to store your customized translation files inside directories such as
/wp-content/plugins/sfwd-lms/languages/ due to risk of overwrite in the event of a plugin update.
Not Accounting for All Contexts
Translating a word once does not necessarily change the word in all strings in which that word occurs.
Words used in different contexts may be the same in your language. For example, “quiz” may serve as both a verb and a noun in English.
Understand that other languages may use different words depending on the context, and your translation files will need to account for that on a string-by-string basis.
PoEdit and Loco Translate both have search features to ensure you are accounting for every instance of a word in the translation files.
Not Considering Strings from Third-Party Code
Not every translatable string seen on a LearnDash-related page, such as a page that contains what appears to be a Course Grid or Login Form, is from the LearnDash codebase. Therefore, you may not be able to find the word you need to translate in the LearnDash file source text.
Or maybe you do, however the string output is coincidentally duplicated in third-party code where it is actually being output.
This is especially common with WordPress themes built with LearnDash in mind, such as BuddyBoss, that override template files (or other third-party addons for LearnDash).
For example, the LearnDash source text includes the string “Incorrect username or password. Please try again”
You change that string in your LearnDash .po file, but notice it is not reflected on your site. Other parts of your LearnDash translation are working as intended.
This may be because the string is actually output by third-party code, and is coincidentally using the same string. You would need to translate it separately.