In this post you will learn how to localize and translate Elegant Themes into various languages. Elegant Themes provides three languages, English, German and Russian, but you can translate your theme into the language of your choice using Poedit software.
(IMPORTANT UPDATE: Since February 2015 Divi theme is already translated into 32 languages and can also be translated into other languages without using po and mo files)
In this post I’ll explain how to translate Elegant Themes into Spanish, however the process is the same for all languages.
1. Setting up WordPress Site Language
Since WordPress 4.1 you can change easily the language of your website from the WordPress dashboard. You don’t need to modify WPLANG in wp-config.php file. All you have to do is go to Settings> General> Site Language, and select your language (o install a new language).
2. Elegant Themes language files
There are WordPress core language files (see paragraph 1) and theme language files:
- WordPress core language files. WordPress is presented in English, but you can install it in more than 80 different languages.
- Elegant Theme language files. Elegant Themes only provides three languages: English, German and Russian. So if you need to translate your theme to another language, you can do it using po and mo files and Poedit sotware.
First it is important to download the most current version of your theme. If you look in the main theme structure, you will find a folder called “lang” with six files:
- en_US.po / en_US.mo (English version)
- de_DE.po / de_DE.mo (German version)
- ru_RU.po / ru_RU.mo (Russian version)
As I said before, the .po file includes the original texts and the translations of your theme in two columns. It’s a translation that someone else started (a professional translator, the author, etc), and maybe completed. WordPress doesn’t use it.
The .MO file includes the exact same contents as PO file. The two files differ in their format. While a PO file is easy for humans to read, MO files are compiled and are easy for computers to read. WordPress gets translations from .MO files.
The .MO file is automatically created by Poedit whenever you save a PO file. All you can do with these files is to upload or re-upload them whenever you create or update a .PO file.
3. Translating Elegant Themes into Spanish with Poedit
I will show you how to create your own translations using a program called Poedit. Keep in mind that Poedit is a very powerful tool with many options so I am going to cover the basics.
Poedit is a software (available for Mac, Windows and Linux) which you can use to translate your theme. It’s available for free on poedit.net. Free version comes with a builtin translation memory that remembers your past translations and uses them to make suggestions for similar texts.
Here are the steps to translate the theme into Spanish (or any other language):
- Open Poedit and select File > New Catalog from POT / PO file
- Select en_US po file from your theme (you can find the file in the wp-content/themes/divi/lang/ folder).
- A box will pop up asking for language of translation. Select Spanish- Spain (Español – España)
- Hit OK and Poedit will name automatically your file. If you select Spanish (Spain): es_ES.po
NOTE: You might think that the country code specification can be redundant. But some languages have dialects or variants in different countries. Example: es_MX (Spanish in Mexico). The country code serves to distinguish the variants.
- Save your file in your computer
- Now you can start translating your theme or your plugin. The space at the top will display all the text ready to translate, and any completed translations will display to the right. The boxes underneath show the source text, your translation and any notes for translators. Translating is really easy – just select a word or phrase, enter your translation and click “Validate”.
IMPORTANT:
- You have to respect all special characters from the original text (look at the screen capture)
- It´s not necessary translate all text strings. Perhaps you don´t want to translate text strings in the admin theme.
- When you’ve finished, save your file. Poedit will automatically create both .po and .mo files. You´ll have to upload both to your theme’s languages folder. I use Filezilla to upload the files to my server.
FINAL NOTE: You can find Elegant Themes Spanish translations in this link.
Thanks for sharing!!!
Tom says
Again a perfect ‘how to’!
So it happens I’m going to get me the divi 2 theme.
And with your nice article I’ll be able to translate it into other languages.
Will ‘borrow’ the Spanish one from you 😉
Irena Domingo says
Hi Tom. Thanks a lot for your comment!!
Judet says
Thanks for such a great tutorial! Do theme updates affect the translation of your site? Do you need to copy the .mo and .po files each time you update the theme?
Irena Domingo says
Hi Judet. Thanks. Good question. Yes, you need to copy the files each time you update the theme, so saves a copy of the files on your hard drive. Except German and Russian, of course, since these languages are already included in the themes.
kele says
Hi,
I know that my question is not about this topic, but I could not find answer anywhere…
So, I would like to create multilanguage website by using Divi theme. I am familiar with Qtranspate plugin, it works great and with some modifications and “Widget-logic” plugin I was able to translate the whole websites into more languages by using some other themes.
In Divi theme the main, and most awesome feature is “Page Builder” with all those modules. I have setup everything and I could not make it work with Page Builder. When I create normal page everything is OK.
Is there any way to create multilanguage website with Divi and Page Builder? Any workaround is acceptable, no matter what has to be done…
Irena Domingo says
I have not tested Divi with qTranslate. Note that qTranslate is no longer updated. I recommend you using other options. The best options to make a multilingual site with Divi are:
– WPML, compatible with Divi and Page Builder.
– WordPress Multisite and a translation plugin (Multisite Language Switcher, Multilingual Press, etc)
More info in this article: How To Make A Multilingual WordPress Site
Tom Nguyen says
So I would need to manually translate into my preferred language?
Irena Domingo says
It depends, only if your theme has not been translated into your preferred language.
Leo Lunde says
I’ve made the file and uploaded it. Now what? The language hasn’t changed.