Needs review
Project:
Localizer
Version:
5.x-3.12
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Sep 2008 at 20:36 UTC
Updated:
18 Sep 2008 at 21:01 UTC
Jump to comment: Most recent file
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?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | localizer.module_front_page.patch | 541 bytes | pearcec |
Comments
Comment #1
pearcec commentedI 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.