Front page redirects to the language type for that node, browser detect ignored.
pearcec - September 18, 2008 - 20:36
| Project: | Localizer |
| Version: | 5.x-3.12 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
I can't figure out why exactly. But I know it is happening with this snipe
function _localizer_change_language() {
if (variable_get('localizer_switch_byhostname', FALSE)) {
$currenthost = $_SERVER['HTTP_HOST'];
$languagebyhostname = localizer_language_by_hostname($currenthost);
if (localizer_isvalid_language($languagebyhostname)) {
localizer_set_language($languagebyhostname);
}
return;
}
$is_content = false;
if (arg(0)=='node' && arg(1) && is_numeric(arg(1))) {
$content_language = localizernode_get_content_language($_GET['q']);
if (localizer_isvalid_language($content_language)) {
localizer_set_language($content_language);
}
$is_content = true;
}I have two front pages. connected. I set the front page in site settings is "hjem".
home -> node/9
hjem -> node/10 as URL aliases
So it comes along and get's "hjem"'s language of "da" and sets it to that. Not sure what you have planned there. Any thoughts?

#1
I think this patch does it. Essentially if localizer is the front page we *dont* want to pull the language from the node if it isn't in the path. We want the one from the browser. It always bugged me that this never worked.