Easy Digital Downloads in your own language
Easy Digital Downloads comes with over 120 language translations included. If yours isn’t included, is incomplete or you want to make changes to a language, you can create your own translation by following the steps in this document.
Table of Contents
- Translating Easy Digital Downloads core plugin
- Option 1: Use your own translation files
- Option 2: Contributing Translations
- Integrations with 3rd party language plugins
- Easy Digital Download Themes
Setting language for Easy Digital Downloads
The primary EDD plugin (not extensions) is translated based on the language set in the WordPress settings (Settings > General > Site Language). Most popular languages are support but a full list can be found here.
Easy Digital Downloads has been translated into a large number of languages and we strive to make the platform as accessible as we can for people from all parts of the world. If Easy Digital Downloads has not been translated into your language, or if the translation needs updated, you’ll need to submit a request for a new “locale” via the Polyglots team at WordPress.org.
Option 1: Use your own translation files
This short guide will show you how to use your own translation files and translate Easy Digital Downloads into your own language. You can also copy and existing language file and update it for you specific purpose using these steps.
1. Create your translation file.
Using POEdit, open the file in the Easy Digital Downloads plugin found here:
wp-content/plugins/easy-digital-downloads/languages/easy-digital-downloads.pot
Now that you have the file open in POEdit, enter your translations into POEdit and then save your translation by going to “File” > “Compile to MO”. Save the file so it sits in this directory:
wp-content/languages/plugins/easy-digital-downloads/
And set the filename to be:
easy-digital-downloads-de_DE.mo
Take note of the last part of the filename (de_DE) as it will change based on your language. This is called a “WP Locale”. You can find your language’s WP Locale by looking at the WP Locale column in the language list: https://make.wordpress.org/polyglots/teams/
For example, if your language is France French the file name would be:
easy-digital-downloads-fr_FR.mo
If your language is Canadian English the file name would be:
easy-digital-downloads-en_CA.mo
Note that we store the translation files outside of the plugin’s normal directory. This is so that when the plugin is updated, it doesn’t overwrite your custom translation files. The wp-content/languages/plugins/ directory is safe from updates while the wp-content/plugins directory is not.
When EDD loads language files, it first checks wp-content/languages/plugins/, and wp-content/plugins next. If the same file exists in both directories it uses the first file it finds.
2. Change the language your WordPress uses.
To do this, log into your WordPress dashboard and go to “Settings” > “General” > “Site Language”. Change it to your language and your translation files will be used.
Translating EDD Extensions
The process for translating any EDD extension is the same as the steps above. The only difference is the name of the plugin. For example, to translate the EDD Recurring extension, using POEdit open the .pot file included with the plugin which is found here:
wp-content/plugins/edd-recurring/languages/edd_recurring.pot
Now that you have the file open in POEdit, enter your translations into POEdit and then save your translation by going to “File” > “Compile to MO”. Save the file so it sits in this directory:
wp-content/languages/plugins/edd-recurring/edd-recurring-de_DE.mo
Again, make sure to replace the “de_DE” with your language’s WP Locale.
NOTE: Not all EDD Extensions have been updated to use that location for translation files so you may need to try placing them directly in the wp-content/languages/ directory. If you find an extension that isn’t loading your translation file correctly, contact support.
Translating Child Themes
Child themes are different from extensions or normal themes because they can have their translation files safely contained directly within the Child Theme directory. This is because child themes are safe from updates. Depending on your child theme, you may or may not have a functions.php file. If you do not, create it in the root of your child theme.
1. Add the following code to the functions.php file:
function child_theme_slug_setup() { load_child_theme_textdomain( 'parent-theme-slug', get_stylesheet_directory() . '/languages' ); } add_action( 'after_setup_theme', 'child_theme_slug_setup' );
2. Add your translation files.
When you save your .mo file from POEDIT for the child theme, save it to the /wp-content/themes/child-theme/languages directory. If you do not have a /languages folder in your child theme, create it.
Your file names will use the text domain of the parent theme you are translating. So if you are translating Vendd to Spanish, your file paths would be /wp-content/themes/child-theme/languages/es_ES.po and /wp-content/themes/child-theme/languages/es_ES.mo.
Option 2: Contributing Translations
If you want to contribute translations so other people can use them as well, you can do so by visiting GlotPress. You can read about how GlotPress works in the WordPress Translator’s Handbook.
The Process
- Go to the translation page at https://translate.wordpress.org/ and choose a language you’d like to work with.
- Choose Plugins from the nav at the top of the page.
- Search for Easy Digital Downloads with the search tool in the top right.
- Click the Translate Project button.
- Choose what you’d like to translate: Stable or the Stable Readme, and Development or the Development Readme.
- Choose a string you’d like to translate, and press Details on the right.
- The Details link will open something similar to this: Simply type in your translation and press the button labeled Suggest new translation.
- After a suggestion is made it goes to a validator. If you’d like to read more about the process after you’ve made a suggestion, please read these docs:
Unless you’re a validator, that’s it! You may simply move through the docs translating everything you’re comfortable with.
Local Translating and Testing Easy Digital Downloads core plugin
While the main translation work has moved to GlotPress, it’s still possible to create your own .po files and use them in a way that won’t let them be over-written on updates.
If you want to download an existing language file you can look in /easy-digital-downloads/languages in your plugins file for the proper .mo file.
If you’ve translated an official Easy Digital Downloads extension into your own language and would like your translation to be included in future updates, please submit your file(s) to our support team.
Integrations with 3rd party language plugins
Note, any problems with translations encountered when using a 3rd party translation plugin should be reported to the support / development team of the 3rd party plugin.
The WPML Plugin (3rd party)
Easy Digital Downloads is fully compatible with WPML, the WordPress Multi-Lingual plugin. In order for everything to be available for translation, however, you need to install a WPML “glue” plugin. WPML has published a complete guide on how to set everything up.
The Polylang Plugins (3rd party)
Easy Digital Downloads is fully compatible with Polylang, the WordPress Multi-Lingual plugin. In order for everything to be available for translation, however, you need to install a Polylang “glue” plugin. You may download a basic one on github.
Easy Digital Download Themes
All official Easy Digital Downloads themes are translation-ready. Each theme includes a /languages
directory in the root and a .pot that includes all strings that are ready for translation.
The typical way to translate a WordPress theme requires that you use
.po and .mo files in the /languages
directory of the theme. However, if you make any edits to a parent theme, including adding translation files to the theme, your edits will be overwritten (and completely lost) once the theme is updated. So this is not a good method.
Instead, it is best to upload your translation files directly to your child theme/languages
folder. Follow the steps below.
1. Use Poedit (or similar tool) to create translation files.
Find the needed
.pot file in the /languages
directory, which is located in the root of the parent theme folder. Use that .pot file in a translation tool like Poedit to create your .po and .mo translation files.
2. Edit child theme functions.php file.
Depending on your child theme, you may or may not have a
functions.php file. If you do not, create it in the root of your child theme.
Add the following code to the
functions.php file:
3. Add your translation files.
Upload your
.po and .mo files to the /wp-content/themes/child-theme/languages
directory. If you do not have a /languages
folder in your child theme, create it. The file names should follow this format: es_ES.po
& es_ES.mo
(example for Spanish translation). Your file names should not include the theme slug.
Your file names will use the text domain of the parent theme you are translating. So if you are translating
Vendd to Spanish, your file paths would be /wp-content/themes/child-theme/languages/es_ES.po
and /wp-content/themes/child-theme/languages/es_ES.mo
.