Detect translatable strings in custom module code I have a D6 site with several custom modules. The site now needs to support multiple languages.

All my strings are wrapped in t() and I'm pretty familiar with locale.module and the i18n modules. I know that all translatable strings get written to the 'locales_source' table, and that from there I can export a .pot file to send to translators. 

What I can't figure out, however, is how I can get all of the translatable strings in my custom modules into the 'locales_source' table. I know that the t() function calls locale(), which in turn will write a newly found string to this table, but how can I make all translatable strings get into the table at once?  I think I need a function that will parse the PHP source for t(), watchdog, hook_menu, etc to find everything that's translatable and write it to 'locale_source'...?
You can install the Translation template extractor module.


  The Translation template extractor provides a web based and a command line Gettext translation template extractor interface for Drupal as well as a reusable API to look for translatable strings and translatability errors. This tool is used under the hood at http://localize.drupal.org/ as well to serve as a parsing machine for Drupal.org project releases.


If you want a user interface that allows you to translate in any language the strings provided by your custom module, then you can install the Localization server.


  It provides a generic translation database backend with a community localization user interface, which allows people to collaborate on translating projects to different languages. It currently contains tools to translate Drupal projects as well as general Gettext based sources.


The difference is that the first module allows you to create the translation template files necessary to translate the strings provided by any module running on your server, including any custom module. Those files need to be edited to create the actual translation files that provide the translated strings.
The second module, which depends from the first one, allows to create the translation files using a user interface. While the first module requires you to manually edit the translation template files to obtain the translation files, with the second module you can do it using Drupal.