How to extract translatable (double underscores and _e) strings?

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

Leave a Comment