WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I made a custom theme and wonder how could I extract all translatable strings to a .po file so I can translate it. Do I need WPML plugin?

Ex: I have a string "soccer" which is written as _e('soccer','mytheme'); and I want to translate it to "futebol" but how can I transport it to a .po file?

share|improve this question
Check this post – Pieter Goosen Jun 29 '14 at 10:22
up vote 1 down vote accepted

One way is to use the WordPress i18n tools. I had to checkout WordPress trunk to make it work. On the command line:

svn co http://develop.svn.wordpress.org/trunk

once you have trunk somewhere, you'll then want to call the makepot script. Again, on the command line:

php /path/to/wordpress/trunk/tools/i18n/makepot.php wp-theme /path/to/your/theme/

After that script has run, the pot files will be in whatever directory was specified in the above /path/to/your/theme

More information and a couple of other methods can be seen here: http://codex.wordpress.org/I18n_for_WordPress_Developers

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.