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' => 'en', 'name' => 'English', 'native' => 'English',
'direction' => 0, 'enabled' => 1, 'plurals' => 0, 'formula' => '',
'domain' => 'www.example.com', 'prefix' => '', 'weight' => 0, 'javascript' => ''
);
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->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?