Set default language for domain I have one site with 2 domains one example.de and one example.com its a multilanguage site, so i have urls like this example.de/de/content and example.de/en/content etc, and same on com domain.

Default language is de for this two domains, but for example.com i need english to be default language.

i thought i can change it in settings.php with $conf['language_default'] like this:

$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; 'www.example.com', 'prefix' =&gt; '', 'weight' =&gt; 0, 'javascript' =&gt; ''
);


its working but for both domains... . also i managed to redirect users to en on example.com (my home page is a node with nid 89)

function MYMODULE_node_view($node) {

        if ($node-&gt;nid == 89) {
            if ($_SERVER['SERVER_NAME'] == 'www.example.com') {
             header('Location: http://www.example.com/en');
            }
        }

    }


but its not an option

Is there any solution to change default language for my example.com domain?
Though I'm surprised if there's not an option in the user interface, according to language_default, it appears you could set the default language as a $conf variable in the shared settings.php file.

Something like

settings.php:

switch($_SERVER['SERVER_NAME']){

  case 'www.example.com':

    $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; 'www.example.com', 'prefix' =&gt; '', 'weight' =&gt; 0, 'javascript' =&gt; ''
    );

    // Example per-domain cache prefix if using memcache
    $conf['memcache_key_prefix'] = 'en_';

  break;
  case 'www.example.de':

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

    // Ensures cache varies by domain
    $conf['memcache_key_prefix'] = 'de_';

  break;

}


Update: Added example memcache cache key prefix setting - to ensure cache varies per domain, if required.