Poedit

What is Poedit

Poedit is an open-source translation file editor for localizing software interfaces that use gettext, like WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., plugins, and themes. It is available for Windows, macOS, and Linux.

With Poedit you can download a POT filePOT file POT files are the template files for PO files. They will have all the translation strings left empty. A POT file is essentially an empty PO file without the translations, with just the original strings. with the original WordPress stringsString A string is a translatable part of the software. A translation consists of a multitude of localized strings. and create a .PO file and .MO filesMO files MO, or Machine Object is a binary data file that contains object data referenced by a program. It is typically used to translate program code, and may be loaded or imported into the GNU gettext program. This is the format used in a WordPress install. These files are normally located inside .../wp-content/languages/ with your translations. Poedit offers a clean and easy to use translations interface and supports plural forms and UTF-8. Poedit comes in two versions: “Free” and “Licensed”. The benefit of the licensed version is that you can pre-translate original WordPress strings.

Top ↑

Download and install Poedit

Download link: http://poedit.net/download.php

PoEdit Translation Software

Top ↑

Download the official WordPress POT file

Download the official WordPress POT file

  • To download the original strings, click on the project you want to translate.
  • Select your localeLocale Locale = language version, often a combination of a language code and a region code, for instance es_MX denotes Spanish as it’s used in Mexico. A list of all locales supported by WordPress in https://make.wordpress.org/polyglots/teams/, as shown in the image below:
Select your locale in translate.wordpress.org.
  • Then click on Export, after which you will see a pop-up:
Poedit pop-up after export.
  • From the drop-down menu next to Open with, select Poedit.
  • This will launch Poedit and display the original strings.
  • Now, you can begin to translate the empty strings or edit the strings with existing translations.
When Poedit launches, you will see the strings.
  • If you have a licensed version of Poedit, you can now pre-translate the empty strings.

Top ↑

Create .po and .mo files

  • Open the .pot file in Poedit.
  • Go to File → Save as… to save your translations in a .po file. Your file should carry the name of the language you will be translating into. Check the Codex page to give your file the right name: https://codex.wordpress.org/WordPress_in_Your_Language.
    The name you should use is the combination of the project’s text domain (locate it inside codes) and a short stringString A string is a translatable part of the software. A translation consists of a multitude of localized strings. in parentheses next to a language’s name (e.g. French – Français (fr_FR)). For example, if the text domain is bwp-minify and the translation is French, just name the .po filebwp-minify-fr_FR.
  • Poedit will automatically compile a .moMO files MO, or Machine Object is a binary data file that contains object data referenced by a program. It is typically used to translate program code, and may be loaded or imported into the GNU gettext program. This is the format used in a WordPress install. These files are normally located inside .../wp-content/languages/ file for you when you save your work on the existing .po file. In order to do that, make sure you go to File → Preferences and on the Editor tab check the Automatically compile .mo file on save box.
Set up Poedit to automatically compile an .mo file for you upon saving.

Top ↑

Translating with Poedit

The basic translation screen consists of a list of strings for translation and two separate windows for the original string and the translated string.

The process is easy:

  1. Click on a string from the pool.
  2. Add the translation in the translation modal (there could be developer notes in the modal on the right, so don’t forget to look for those).
  3. Save your translations.

Translated strings are shown next to the original in the pool of strings and you can keep track of your progress in the bottom of the translation screen.

PoEdit Translation Screen

Note: If you use pre-translation, the translations that are added will have a different color. You will need to change the state of the string by editing it and then saving.

Pre-translated strings appear in a different color in Poedit.

Or use the button Needs work on the right of the line to edit and approve the string.

Use the Needs Work button to edit and save pre-translated strings.

Top ↑

Uploading your translations

After you have downloaded the original POT file from the project and translated it with Poedit, you will need to upload the file into the project to import your translations.

  • To save and compile your translations, go to File → Save as… to save your translations in a PO file.
Click on Save to create a PO file to upload.
  • Before uploading your translated file, make sure the locale is set correctly.
  • Once set, you can then import your translations into the project by using the Import translations link. From here, you will be able to select your translation file.
Clicking on "Import translations" will allow you to select your file.

You can also find the instructions here: Importing External Files

  • After you have selected and imported your file, you will see the number of strings imported.
After importing, you will see the total number of strings added.
  • Finally, please check if there are any strings that are shown as “Untranslated”, “Fuzzy”, or “Warning,” they will need to be fixed.

Top ↑

Additional notes

  • If you see a yellow warning sign next to one (or more) of your translations in Poedit, this means something is wrong with the translation.
These yellow icons indicate an error with the translation.
  • If you select the string, you will be able to see the cause of the error:
Clicking on the string will show you the cause for the error.
  • You need to resolve these warnings before uploading your file. As soon as you fix the string, the warning is removed and the error message will disappear.
  • Also note that Poedit sometimes removes characters, which can cause problems with placeholders. For examples: “% s”  instead of “%s”, or “%1s” instead of “%1$s”

Last updated: