Sections

How to Translate a WordPress Plugin

Our plugins are all in English but are designed to be translated into any language. Just like our themes, they include a language file (.pot) that contains the text strings which is what needs to be translated.

There are many ways to translate a WordPress plugin. The most popular is using a program called, PoEdit. It works great but there’s a steep learning curve for those who are not tech savvy (install the software, download the .pot plugin file, create a new project, translate text strings, export a .mo file, upload the file to a specific spot on your server, etc). We wrote a separate tutorial on how to do that for our themes.

The best and easiest solution we’ve come across doesn’t require any separate program or translation file to upload to your website. It’s all handled gracefully and automatically from within wp-admin. It’s a free plugin called Loco Translate by Tim Whitlock. They also have paid plans (a monthly subscription which is silly…it should just be a one-time fee) but if you’re only translating a couple of plugins, you won’t need it.

It took me no longer than five minutes to translate a few text strings and have them working on my test website.

Step 1

Step 2

Navigate to the “Loco Translate” sidebar menu and click on the “Plugins” link

Click on the “Stripe Payment Gateway” (or whatever plugin you want to translate)

If you get a “Template missing” message on the next page, it means the plugin hasn’t created a .pot file for you to translate. Follow the instructions on the screen for your available options.

Step 3

You’ll now see the overview page for the plugin. It’s a little overwhelming but you can ignore everything (including the “Additional files found” notice) except for the “New language” link. Click it.

Step 4

The next page will tell you how many text strings are available for translation. It also gives you two very important options to select.

Choose a language – What language you want to translate the text into. In our example, we want German. Select it from the “WordPress language” dropdown.

Choose a location – Where to save your finished translation .po file. Make sure to select the “System” option. If you keep the default “Author” option, it’s saving it in the same folder as the plugin. That’s bad because the next time the plugin author updates the plugin, it will delete your .po file!

If your language isn’t in the dropdown or you get an error when trying to set the file location, chances are you don’t have the WordPress language file or it’s related to permissions on your server. See the Loco Translate beginner’s guide for tips on how to resolve these issues.

Step 5

This is where you translate the text into your language. You can translate only a few text strings or all of them.

Below the “Save” button, click the “Make Payment” line in the “source text” column

Go down to the “German translation” section and type in the German text for “Make Payment”

Continue this process for each text string until all are translated to your liking

I recommend saving often just in case your browser crashes so you don’t lose all your work. Also, once you’re completely done, download the .po and .mo files so you have local copies (links in top right corner). If you switch web hosts or your site gets deleted, you won’t have to go through this again.

That’s it! Now go visit your website to where you expect that text to be translated. If not, see the FAQ section below or check out the Loco Translate guide to help troubleshoot.

FAQ

What if the text doesn’t show up translated?
You probably aren’t using that same language file for WordPress. Go in and set it correctly and then try again.

What happens when the plugin has an update?
Sometimes new text is added or removed when the plugin has a new version rolled out. It’s good practice to check after you update the plugin to see if there’s any delta.

Do this by going back to the edit language file and clicking the “sync” button for that specific plugin as shown in the screenshots below. If any new text is found, you’ll need to translate and save just like you did in previous steps.

Like this tutorial? Subscribe and get the latest tutorials delivered straight to your inbox or feed reader.