What are .po and .mo files?

po and mo files contain all text of your WordPress theme or plugin. You can enter a translation in these files, so that translated text appears in the right place on your website.

What is and isn’t translated with .po and .mo files?

The .po and .mo files are not for translating the web texts you have written (such as the texts from the article you are reading now), but only for translating certain fixed terms from a theme or plug-in. Consider, for example, a button text such as ‘Add to shopping cart’: this is a text that has already been written by the maker of the theme or plug-in. It are these kinds of texts that are translated through .po and .mo files.

Why are .po and .mo files necessary?

There are many WordPress themes and plugins. Usually they are built in English for an international market. But what if your website is in Dutch? You want a button to say ‘Voeg toe aan winkelwagen’ and not ‘Add to cart’. With the .po and .mo files you can translate the texts that have already been entered by the creator of the theme or plug-in. Incidentally, it is often not necessary to translate all texts from a theme or plug-in. In the .po and .mo files, you only have to translate the texts that you use in your website.

How do you modify .po files?

A useful program to modify .po files is Poedit. Proceed as follows:

  • Open the .po file in Poedit (or a similar program).
  • Enter the translations for the texts that appear on your website.
  • Are you translating a theme?
    • Save the translation of a theme as nl_NL.po and nl_NL.mo.
    • Put the file in the ‘languages’ folder in ‘wp-content’ via the FTP.
  • Are you translating a plugin?
    • Then look at the correct name (often pluginname-nl_NL … ).
    • Put the file in the ‘languages’ folder in ‘wp-content’ via the FTP.

Here you can check whether (partial) translations of plug-ins or themes already exist. You can use this or continue working on it.

Need help
with a topic?

Or looking for
something else?

Drop us a note

This field is for validation purposes and should be left unchanged.
WPorters