I ran into some problems using the Table Wizard when the Locale module is active and you're viewing the content in a language other then English. It will dump errors for all external databases, to be specific :

    * user warning: Table 'external.locales_source' doesn't exist query: SELECT s.lid, t.translation, s.version FROM locales_source s LEFT JOIN locales_target t ON s.lid = t.lid AND t.language = 'nl' WHERE s.source = 'Tables which are not currently managed\n by the Table Wizard or otherwise already made available to Views' AND s.textgroup = 'default' in D:\Data\www\drupal6\htdocs\modules\locale\locale.module on line 375.
    * user warning: Table 'external.locales_source' doesn't exist query: INSERT INTO locales_source (location, source, textgroup, version) VALUES ('/admin/content/tw', 'Tables which are not currently managed\n by the Table Wizard or otherwise already made available to Views', 'default', '6.19') in D:\Data\www\drupal6\htdocs\modules\locale\locale.module on line 391.
    * user warning: Table 'external.cache' doesn't exist query: DELETE FROM cache WHERE cid LIKE 'locale:%' in D:\Data\www\drupal6\htdocs\includes\cache.inc on line 175.

So apparently it tries to insert and delete data in non-existing tables on the external DB.

The problem seems to be due to the fact that the active database is not set to default, which appears to be needed when using t() if the Locale module is active and the current language is different from English (en).

Simple steps to reproduce :

  1. Create an extra database connection settings.php ($db_url['default'] = ...; $db_url['external'] = ...;)
  2. Activate Locale module
  3. Add some extra languages (if needed)
  4. Set Language negotiation to : Path prefix with language fallback
  5. Go to http://yoursite/anything-but-en/admin/content/tw

I currently just added all t() calls before the foreach loop (without passing arguments) to prevent the error messages from showing (which works, because locale strings are cached once they have been fetched), but that is quite dirty.