Tag Archives: international

How to internationalise and translate your WordPress Plugin

Today I got a lovely request from Andrew over at WebHostingHub.com who asked if he could translate my P2 Header Ad plugin into Spanish. “Of course”, I thought – and then I realised that I knew not much about how to get a plugin translation ready. I knew POEdit of course, but how to make my plugin speak another language wasn’t really clear to me.

An online search didn’t really reveal all the answers – snippets here and there, but not the whole picture. So here it is – step by step – as of December 2013.

In a nutshell:

  • add a text domain
  • replace all strings with compatible PHP calls
  • generate a .pot file
  • open it it POEdit and translate your strings
  • switch WordPress to another language to see if it actually works

Let’s check it out