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?

CommentFileSizeAuthor
#1 localizer.module_front_page.patch541 bytespearcec

Comments

pearcec’s picture

Status: Active » Needs review
StatusFileSize
new541 bytes

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.