• contact@ongoingthemes.com

How to translate a WordPress theme with Poedit?

How to translate with Poedit How to translate a WordPress theme with Poedit?

March 20, 2020

Poedit is software that you can use to translate the themes and plugins you use to the local language of your choice. Almost every theme or plugin comes with the language directory and you can start the translation by opening the pot file in this directory with Poedit software. Poedit is available for Windows, Mac, and Linux operating systems. You can download Poedit software from https://poedit.net/ link and install it.
Let’s see how we can translate the theme with Poedit.

Before starting the translation, you will need the following:

  1. Poedit software
  2. The .pot file of your theme or plugin – This file is available in the languages directory of your theme or plugin. For more information, you can see the document that comes with the theme or plugin.

If both are ok, let’s follow the steps below.

Open the Poedit software

To open the Poedit software, you can double click the file with the .pot extension in the language folder of the theme or select the file with the pot extension by clicking the “Create New Translation” button from the window that appears after starting the poedit application.
We will open the Poedit application and select the file with the extension pot.

open poedit How to translate a WordPress theme with Poedit?

Select the file with .pot extension

We open the file with the extension .pot by going to the directory where the file with the .pot extension is located. As an example we will translate the language file of the Homelist theme.

select file with pot extension 1 How to translate a WordPress theme with Poedit?

Choose the language

After selecting the file with the extension pot, a popup titled “Translation Language” appears. You can choose the language you want to translate the theme from this section.

choose language How to translate a WordPress theme with Poedit?

WordPress has local language code for each language. You can review the list from this link.

At the top of the window is the list of languages you will translate. When you click on a line from this list, the “Source text” section below displays the original text. The “Translation” section below is the field you will translate.

poedit translation How to translate a WordPress theme with Poedit?

Save in the correct format

It writes how to save the language file in your style.css file. For example, for Italian language, like homelist-it_IT.po or it_IT.po

save file as po How to translate a WordPress theme with Poedit?

Once you click save PoEdit will automatically generate .po and .mo for you.

Upload these two files in this location by accessing your website via FTP or your hosting’s file manager program, once connected go to wp-content/languages/themes (if you are dealing with themes) or wp-content/languages/plugins (when dealing with plugin translation).

If you do not have this languages folder in your wp-content folder then simply create it.

Change WordPress Language

Finally, after logging into the WordPress administration panel, you should enter the Settings-> General page. You should select the language you translated from “Site Language” field.

select language from the admin panel How to translate a WordPress theme with Poedit?