Change default language from the database? I have made a stupid mistake:

I installed the .po for another language and set it as default (instead of English) even though I did not install/configure all the prerequisites. Now, each time I try to access my website, it goes into an endless loop and I can no longer access its configuration panels.

How can I reset the default language back to English? Is there any file to configure or database entry to change?
In the setting.php file used by your site, add the following lines:

$conf['language_default'] = (object) array(
  'language' =&gt; 'en', 'name' =&gt; 'English', 'native' =&gt; 'English',
  'direction' =&gt; 0, 'enabled' =&gt; 1, 'plurals' =&gt; 0, 'formula' =&gt; '',
  'domain' =&gt; '', 'prefix' =&gt; '', 'weight' =&gt; 0, 'javascript' =&gt; ''
);


This will force Drupal to use English as default language. Once you removed the language files for that language, remove those lines from the settings.php file, or Drupal will always use English as default language, indifferently from what you set from the setting page.

The same trick works also for Drupal 6.