How to generate .pot files for WordPress 3.1

If you're using TwentyTen here is a quick way to generate a default.pot .  You can also copy it to a locale name i.e. en_GB - give it to someone to translate then copy it into the folder. (Some translation programs want it named .PO just name it back after, they are the same file type).  Twentyten will pick it up automatically if the visitor's browser is set to that language.

Install gettext , probably from your OS' regular add/remove. (On Linux anyways, Mac or Windows good luck).

find . -type f -name '*php' | xargs xgettext -LPHP --add-comments=translator --no-wrap -F -k_n -k_e -k_x -k__ -o default.pot

Newer versions of xgettext will let you pre-fill more POT info on the commandline. Like you can add:

--copyright-holder=MyPlace --package-name="The Website" --package-version="1.3" --msgid-bugs-address="me@MyPlace"