In order to be kind to our friends that do not speak the language we have written our plugin in, it is always a good idea to fully localize your WordPress plugin. This means make it “ready for translation”. If you are one of those that is blessed with the fluency of more than one language, then you can also translate it, but for the majority of us, localizing will be enough. Making your plugin ready for translation is actually a pretty simple task, but, unfortunately, has very, very little good documentation on how it is done. So I’d like to take you in depth on the topic and actually demonstrate how it is done.

Photo by elenathewise:

For this tutorial, I’m going to start from the beginning and actually show you how to setup your plugin for translation (this means localizing it). I’m going to do this by translating part of one of my plugins, Full Screen Background Images Pro. To help you out, I’m going to provide basic instructions after the video in text form, but the majority of explanations will take place in the video.

How Translation Works

While it may sound very difficult and time consuming, making a plugin ready for translation (and even translating it) does not take long, nor is it difficult. It works by storing all of your plugin text into a “catalog”, which acts as a reference and has all of the text translations stored in it. When WordPress is set to display in a language other than the default (English), the catalog is used to look up the appropriate translations for each piece of text. The translation is then displayed instead of the original text.

  1. WPexplorer

    Great tutorial!

  2. Jason

    You are AWESOME! I love your tutorials and plugins. Can’t wait to see what’s next!

    • Pippin

      @Jason – Thanks! Keep your eyes open because there’s something pretty cool coming in a few days 🙂

  3. Jason

    plugin or tutorial?

    Speaking of tutorials. . .I know you were working on adding an update system to your CodeCanyon plugins. . .did you get one up and running?

    That would be an AWESOME tutorial!

    • Pippin

      @Jason – There are a few new plugins coming really soon. One should be out later today, and several more over the next two weeks.

      I did get the update system running. It’s currently active in Easy Content Types and Full Screen Background Images Pro. I do like the idea of doing a tutorial on it, so I probably will next week 🙂

  4. Jason

    Nice! I’ll check it out.


  5. FxBe

    Great tutorial, thanks for all the developpers not doing it yet. Internationalization should be also a priority when creating a plugin or a theme. You’re giving an oportunity do do it the right way

    • Pippin

      Yes, it should definitely be a priority. Glad you liked it.

  6. J. Pippin

    Just started development this year and was a little baffled about how to do this since diving into WP dev. Thanks for the great tutorial. Will be sure to link to it when I get my personal site up and runnning. Nice name btw.

    • Pippin

      Nice name yourself 😉

  7. Ben

    Hey Pippin nice video my friend! We are in the process of translating our premium plugins and I have to say your tutorial literally saved me hours of research. Thank you!

    • Pippin


  8. sayed taqui

    You explained everything in a very simple way , it used to look like a mystery to me but not anymore. I m using it in all of my themes now. Just one thing that I didn’t understand is that why use __e(‘text’, ‘domain’) for plain text but __(‘text’, ‘domain’); for using in the function’s argument?

  9. sayed taqui

    Okay got that, didn’t notice, it echos it.

    • Pippin


  10. orionrush

    Pippin —
    Thanks for another the great tut. I’m working on a plugin wich creates a tinymce modal where the user chooses settings and inserts a generate a short code into the post. The modal itself is just html and javascript.

    I assume its not enough to convert the file to php and use _e(‘string’, ‘prefix’) to echo the translated strings, but an instance of wordpress must also be loaded into the modal as well?

    Loading WP just to allow translation feels like bringing a tank to a card game.

    • Pippin

      Isn’t the modal used inside of WordPress, so it’s already loaded?

    • orionrush

      Not unless Im doing it terribly wrong (possible), but even when the modal is a php file, its still triggered by tinyMCE button javascript, and from the context of the modal I’ve no access to WP constants etc. The only way around this that I’ve found is to specifically load wordpress prior to outputting the modal markup like so:

      define(‘WP_USE_THEMES’, false);
      // path relative to plugins dir

      It works, the strings translate etc, it just seems (to me) to be a lot of overhead.

  11. Stella

    Hi Pippin.
    I need to translate just the EDD front end to another language. I want to keep the admin interface in English.
    Is that possible with what you describe in this video?
    Will my blog readers see EDD front end in a different language, while I keep the English version of WordPress and your plugin?
    Thank you.

    • Pippin

      No, sorry, that will translate everything.

    • Pippin

      That’s because it will only load the file for the language that the rest of WordPress is using.

    • bob

      have you figured out how to do this?
      i also need to translate only the front end, how to do that?


  12. Sue Newell

    I would like to translate just one plugin so that I can use my terminology for the interface (get rid of state and zip and use province and postal code among other things). I don’t want to affect the rest of WordPress at all.

    Is this possible?

  13. Stephan

    Hello Pippin

    How can i translate the Restrict Content Pro plugin in German?
    I just need the Login-Form and Registration-Form Labels in my Language.


    Hello Pippin, WordPress is not based on WPLANG setting anymore, how should I get to translate the strings on restrict contento pro?

    • Pippin

      The WPLANG constant will still work though.


      Hello Pippin,
      I have just started a new site, but the WPLANG in the wp-config is missing! I have to put it back there? How this thing works? Can you help me please?


      Sorry Pippin,
      I got desperated, it is working fine. I’ve forgot to upload the translation files……


    • Pippin

      Glad to hear it.

  15. Chris Simmons

    Pippin, Just watched the tutorial. Very helpful, thanks. Video is a bit old now so any major changes at this point we should be aware of.

    Need to localize my plugin(wpbackitup) so getting started with your video.


    • Pippin

      No changes that I’m aware of!

Leave a Reply

Error: Please enter a valid email address

Error: Invalid email

Error: Please enter your first name

Error: Please enter your last name

Error: Please enter a username

Error: Please enter a password

Error: Please confirm your password

Error: Password and password confirmation do not match