How to Translate a WordPress Plugin/Theme

If you haven’t translated a WordPress plugin/theme before, it’s easier than you might think and doesn’t take all that long. Developers don’t always create translation ready themes, so when you buy a premium theme make sure to check the plugin’s features list or ask the developer if the plugin has been localized.

There are three types of files used in the framework:

  • POT (Portable Object Template) files: The first step in the translation process is using a program to search through the WordPress source code to pick out text passed into a __() or __e() function, generating a POT file. This file will contain all the text available for translation.
  • PO (Portable Object) files: The second step involves translating the text in a POT file into the target language, saving both English and translator messages in a PO file.
  • MO (Machine Object) files: In the last step, the PO file is converted into a machine readable format.

There are many translation tools available, such as GlotPress, Launchpad and Pootle, but we’re going to use LOCO Translate. LOCO Translate is a free, easy to use open source program for Mac OS X, Windows and UNIX/Linux for editing PO files and generating MO files. In this post I’ll show you how to translate a plugin/theme using LOCO Translate. This plugin provides in-browser editing of WordPress translation files and localization tools for developers, such as extracting strings and generating templates.

VIDEO GUIDE: You can consult our video guide on How to translate a WordPress Theme/plugin using Loco Translate plugin as below:

If you don’t like the video or need more instructions, then let’s go through this step-by-step:

1. Install LOCO Translate.



2. Go to Loco Translate > Home in the left-hand menu to start translating


3. Choose the theme/plugin you need to translate. A catalog properties box will pop up asking for information about what you are translating. Enter the language you want to translate here along with any other details.

Translators: To translate a theme into your language, follow these steps:

  1. Create the protected languages directory at wp-content/languages/loco/themes
  2. Ensure this directory writeable by the web server
  3. Find the theme in the list at Loco Translate > Themes
  4. Click + New language and follow the on-screen prompts.

Developers: To translate your own theme or plugin for distribution, follow these steps:

  1. Create a languages subdirectory in your bundle’s root directory
  2. Ensure this directory writeable by the web server
  3. Find the bundle at either Loco Translate > Themes or Loco Translate > Plugins
  4. Click + Create template and follow the on-screen prompts to extract your strings.
  5. Click + New language and follow the on-screen prompts to add your own translations.

That’s all, hopefully this article helped you know how to translate your WordPress Plugin/Theme with Loco Translate plugin. If you have any further questions for us, don’t hesitate to put it up in the comments. See you again in orther tutorials!

Leave a Reply

Your email address will not be published. Required fields are marked *