Survey Maker
20% off
  • 0days
  • 0Hours
  • 0Minutes
  • 0Seconds

How to Translate WordPress Plugins (Beginner's Guide)

How to Translate WordPress Plugins

Most of the WordPress plugins are developed in the English language. But what if you want to translate a plugin into your own language? WordPress is translated into almost 200 languages, and translating is common in WordPress thanks to a range of plugins and software. In fact, it is a necessity to make your plugins as user-friendly as possible. For example, if you are using a WordPress quiz plugin, to make your quizzes even more accessible you must translate them. Let’s see how to manage that!

Translate or change some phrases for your own website


Today, we will discuss two ways to translate WordPress plugins for a website: via Poedit and Loco Translate. The Poedit software allows you to translate on your computer, while the Loco Translate plugin allows you to do translations inside your WordPress dashboard.

Next, you’ll learn about each of them and understand which one is right for you.

1. Poedit app (computer software)


Poedit Translation App


The Poedit app is a free translation software available for Windows, Mac, and Linux. Searching for how to translate WordPress without a plugin? This is the most convenient way to do it.

Before starting, you need to make sure that the plugin you want to translate is translation-ready. So, begin with downloading the plugin on your computer. Download the zip file of the given plugin from WordPress if you are a free user, or from the official website of the plugin if you are a premium user. After downloading the zip file, please extract it. For this, right-click on the file and choose the Extract files or Extract here options.

Afterward, open the extracted folder and go to the languages folder. You will see a .pot file, the template file you’ll need to translate the plugin.
If you want to translate the current version of the plugin which you have already installed, open the language folder via File Manager.


language pot file


If you can’t see any POT file or a languages folder, then the plugin is most probably not ready to be translated.

As you see the POT file, you can translate the plugin into any language you want. To begin with, you need to download and install Poedit on your computer. After installing the app, please open it and choose one of the options from the opened window.


Poedit Select an Option


If you are using the Pro version, you can select the Translate WordPress theme or plugin option. If not, go on with the Create new translation option.

You will need to select the plugin’s POT file. As you select it, Poedit will ask you to select the language you want to create translation files for.


Language of the Translation


Type in the language name or open the dropdown menu and select from there. Lastly, hit OK.

The translation interface is now in front of you. You will see the words and phrases available for translation. Click on a word or phrase and give its translation in the area below.


Translate Words with Poedit


As soon as you are ready with your translations, you need to save them. Go to File > Save and save your file with the language name and country code (for example, es_ES that stands for Spanish). In any case, Poedit will automatically name your file.


Save Your Translation


Your translation will be saved in PO and MO files. If they are not already placed in the languages folder, put them in there. You can now use them whenever needed.

2. Loco Translate plugin


WordPress Loco Translate plugin


Loco Translate is a tool that helps you easily translate plugins on your WordPress dashboard. With this plugin, you’ll be translating inside your WordPress dashboard, and the changes you make will be visible on your website straight away.

Let’s begin with installing and activating the plugin. On your WordPress dashboard, go to the Plugins page > Add New, search for Loco Translate, then hit Install Now > Activate. After these steps, the plugin will appear on the left nav menu.

Next, go to the Plugins page from the Loco Translate submenu. On this page, you will see the list of plugins installed on your site. You need to choose the plugin you want to translate.


Loco Translate plugin


Once you clicked on a plugin, you will see the languages available for it, together with the translation progress level next to every language.

If the language you want to do translations for is included in the list, click on it. If not, click on the New language button above the list.


Quiz Maker Languages Translation Progress


Now, let’s go one by one through the steps.

1.Choose a language: Upon opening the New Language page, the first thing you’ll need to do is to choose your language. There are two options for this: you can either choose a WordPress language or a custom language. In the first case, the system will use this language file if one needs to see the WordPress dashboard in this language.


Translate Your Plugin into New Language


2.Choose a location: Secondly, decide where to store the translation files. Loco Translate suggests saving them in its folder. However, you can change that and save the files either in the plugin’s languages folder or in the one of WordPress.

Having your settings customized, hit the Start translating button to move on.


Translate Plugin


You will appear in an intuitive user interface, where you’ll see the source text field and a text area for translation right under it. Choose a source text, enter your translation for it, select the next source text, and so on.

In the end, hit the Save button so that your translations are kept.


Translate a WordPress plugin in your language


This way of translating is by far the easiest. Also, it is the suggested method.

You can contribute translations for plugins in, as it comes with a web-based translation tool. When you open a plugin’s page, you will see a notification asking to translate the plugin into your language. This works if it is not translated into your language yet.


Quiz Makertranslate plugin your language


If there is no notification, you can still have your contribution to translating the plugin. You need to find the Translating WordPress page of the plugin. Then, you need to select your language and start your contribution.


Quiz translate plugin your language


After choosing your language, you will need to select a Set/Sub Project. Afterward, you will see a simple user interface with the source text and text area. In the latter, you can enter the translations of particular words.

For further information about how to translate WordPress plugins, read here. Also, you may find the answers to your questions following this link.


How to Make Your Plugins Translatable (for Plugin Developers)


As you already know, translation-ready plugins have POT files. In this section, I will suggest two ways of making your plugins translatable, in other words, ways of creating POT files for them.

  1. You can use Eazy Po to create a POT file for the plugin you want to translate.
  2. You can create a POT file with Poedit.

Let’s go ahead with the second option.

To create a POT file with Poedit, open the app, then click on File > New. Next, you will need to select the language you want to create a new file for. Once done, click on Extract from sources.


Extract from Sources


On the Translation properties section, name your project and reconfirm the chosen language.


Translation Properties


You need to save the project so that you can go on. For this, go to File > Save. Then, click on Extract from sources again and go to the Sources paths section. Here you need the folders or files from which Poedit should extract text strings. So, click on the + icon under the Base path and select your plugin’s folder.


Sources Paths


Next, move to the Sources keywords section, click on the + icon, and enter these two keywords:

  • __
  • _e


Sources Keywords


Lastly, hit OK so that Poedit starts extracting text strings. Once this process is over, you will see all the text strings it has found.

Now your plugin is translation-ready! To do translations of text strings, close Poedit and find the project file you have already saved. It will be a PO file, but consider renaming it into a POT file. You do so to have a source for all of your translations. As you upload this file to Poedit, you will first need to specify the language you want to translate your plugin into, after which you can go on.


How to Keep the Translation Files After Plugin Update


Plugins are constantly updated to meet customers’ needs. And you might think: what happens with the translation files? Are they lost as the plugin is updated? The answer depends on where these files are located.

In most cases, you will need to relocate the translation files of your plugin to keep them after updates. You can do this in two methods:

  1. Automatic method
  2. Manual method

Let’s talk about each.

  1. Automatic method

With Loco Translate, you can relocate your files automatically. For this, go to Loco Translate > Plugins > given plugin > preferred language > Relocate. Here, you can choose a new location for your translations. In order not to lose your files, you can either save them in the folder of Loco Translate or in the one suggested by the system.


Relocate files


If you are not using Loco Translate, then move your files to another location via the manual method.

2. Manual method

If the automatic method doesn’t work for you, you can use the manual one. In other words, you can relocate your translation files yourself. Or, if you are going to create a new file, you can save it in the right folder right away.

So, enter your hosting dashboard via the file manager. Next, go to wp-content > plugins, open the folder named after the plugin (for instance, quiz_maker), and open the languages folder at the end. Then, cut(Ctrl+X command) the necessary translation files(.mo and .po). Come back to wp-content and open the languages folder or create a one if there is none. Lastly, open a plugins folder or create a one inside the languages folder, and paste(Ctrl+V command) your translation files here.

You can use this method if you don’t use Loco Translate or any other plugin or app that allows you to relocate your files automatically.


Other Useful Tips for Plugin Translation


Let’s have a look at a list of tips you may find helpful when translating WordPress plugins.

  • If your plugin is already translated, but the language hasn’t changed, try to change the WordPress language on the dashboard. Go to Settings > General > Site Language, and choose your preferred language from the dropdown menu.


Change Site Language


  • While translating, you need to pay special attention to the symbols and other special characters in the original text.


Pay Attention to Symbols


  • It is not necessary to translate all the words and phrases. You can go on with those which are the most used ones.
  • Make sure your translation files are safe and sound even when your plugins are updated.


Wrapping Up


Translating WordPress plugins is important, especially when it is used by non-English speaking communities. You already learned about two user-friendly ways to translate WordPress plugins — Loco Translate which allows you to translate right on the WordPress dashboard, and Poedit that lets you do translations on your computer.

I hope the article made your work easy and helped you in translating plugins. You can subscribe to our Youtube channel to receive helpful tutorials. Also, you will find us on Twitter and Facebook.

Frequently Asked Questions

What is the best way to translate a WordPress plugin?

To translate a WordPress plugin into any language you can use the Poedit app or use the WordPress Loco Translate plugin.

How do I change the language on my WordPress plugin?

To change the language on your WordPress plugin, go to your WordPress dashboard > Settings > General > Site Language > choose the language you want. You can also translate the plugin with the WPML plugin.

How do I change the language in Poedit?

You need to go to the project page, find the language you want to change, click on the pencil icon, choose the language you want to switch to and save the changes.

50% OFF

Mega bundle offer for you!

It consists of 3 different powerful plugins, each one allowing you to make your WordPress experience the best that could be.
Quiz + Poll + Survey