How to Translate WordPress Themes using POEdit

Spread the love
  • 5
  • 2
  •  
  •  
  •  
  •  
  •  
Rate this post

To translate WordPress themes, they must be properly internationalized which means (Ready for Translation). In our previous guide, How to create Multilingual WordPress Theme, we went through the precess of creating a fully internationalized WordPress theme. The next step is to translate the internationalized theme using POEdit software.

Other ways to translate WordPress themes?

Of course, there are many other ways to translate WordPress themes. You can use a multilingual plugin (like Polylang, Weglot or WPML). In this guide, The Definitive Guide: Create a multilingual WordPress site, we explained multiple options to translate your WordPress site into multiple languages including your themes and plugins textual content.

In this post, we are using POEdit to translate WordPress themes.

Prerequisites:

Before you start translating your WordPress theme, you must have the following:

  1. Translatable WordPress Theme.
  2. .POT file – If you don’t have this file, you will need to create one.
  3. A free version of POEdit software.

Translation Process:

Simply, you need to use POEdit to open the .POT file to create .po file and transform it into .mo files.

english_plz

page builder banner

What are .POT, .PO and .MO?

  • POT (Portable Object Template): a file that contains every translatable string or text.
  • .po (Portable Object): It’s the file created when you translate your POT file to a particular language. For example, fr_FR.po
  • .mo (Machine Object): It’s the file that the machine can read, it’s a binary file. You’ll have to convert your .po file to .mo file. For example, fr_FR.mo
READ  Scrybs - Another Automatic WordPress Multilingual Plugin

Steps:

1- Open POEdit -> File -> New

2- Choose the language you need to translate your theme into.

Translate WordPress Themes using POEdit

3- Click on “Update from POT”.

4- Save the file as it suggests to you (the language code; for example fr_FR.po, es_ES.po, etc…)

5- Open the POT file, it is usually located in languages (or lang) folder inside your theme folder.

6- Start translating your theme strings using POEdit.

How to Translate WordPress Themes using POEdit

7- Once you are done with the translation, click File -> Save.

8- Create the .mo file by going to File -> Compile to MO.

9- Move both .po file and .mo files to languages folder in your theme directory. It might be called lang.

POEdit alternatives?

Yes, I have found this plugin Loco Translate. It allows you to create language files via WordPress admin.

Features:

  • Built-in translation editor within WordPress admin
  • Create and update language files directly in your theme or plugin
  • Extraction of translatable strings from your source code
  • Native MO file compilation without the need for Gettext on your system
  • Support for PO features including comments, references, and plural forms
  • Configurable PO file backups
  • Built-in WordPress locale codes

Read this full Loco Translate tutorial of how to localize your themes and plugins from your WordPress Dashboard.

Conclusion:

Translating WordPress themes is an easy task, but it might take you some time as you will be translating all the textual content of the theme. Once you have the theme’s POT file all you need to do is translate it to create the .po file then convert it to a .mo file and copy both (.po and .mo) files to you theme’s language directory. Congratulations! Now you have your theme translated.

READ  Multilingual SEO in WordPress - Definition and Best Practices

If you have any issues or questions, don’t hesitate to post them in the comments below.

(Visited 49 times, 1 visits today)
  • 7
    Shares

Nagdy

I write about Multilingual WordPress, SEO, Website Performance. Also, I like answering WordPress question on Quora. When I have the time, I run online sessions to teach WordPress for my personal FB page fans!

Hopefully you'll come back soon!
Get More Stuff
WordPress Multilingual, Performance, SEO, Reviews and HOT Deals. One email per week!
Stay Updated
Give it a try, you can unsubscribe anytime.
Close
GET MORE STUFF
IN YOUR INBOX
WordPress Multilingual, Performance, SEO, Reviews and HOT Deals. One email per week!
Stay Updated
Give it a try, you can unsubscribe anytime.
mattis id velit, sem, tempus id dictum amet, accumsan id, venenatis, diam

Pin It on Pinterest

Do you find this interesting?

Share it with your friends!