HowTo: Different default languages per domain/subdomain

Last modified: November 26, 2008 - 13:16

In Drupal 6 the default language is an object stored in a variable. So if you want to have different default languages for each domain/subdomain, you need:

1. Different settings.php files, one for each domain, see the handbook about multisite set ups, http://drupal.org/getting-started/6/install/multi-site

2. To properly set up the language default variable in settings.php. For English as the default language it would be:

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

English is the default language if no other is specified. For the subsite using the actual site's default language you can skip this configuration.

 
 

Drupal is a registered trademark of Dries Buytaert.