"home" link switches to default language

Rafał Ch - September 3, 2008 - 09:47
Project:Localizer
Version:5.x-3.11
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

"home" link has no language code so, no matter what language you are currenly using, clicking on "home" switches to default language

#1

costinius - October 7, 2008 - 17:53

same for me, subscribing

#2

TwiiK - October 30, 2008 - 09:20

I noticed this as well today.

My quick hack to circumvent this on a site I'm making now was this:

<?php
   
switch($language) {
        case
'en':
           
$homePath = $base_path . '?q=en';
          break;
        case
'de':
           
$homePath = $base_path . '?q=de';
          break;
        default:
           
$homePath = $base_path;
          break;
    }
?>
 

Luckily the only "home" link I had was the logo so it was easy to switch $base_path for $homePath. :)

#3

BarisW - October 31, 2008 - 22:00

I had this as well. Check your site settings (start page). Make sure this isn't set to something like 'node/18' but use the translated pathalias, eg: 'home'. This worked for me.

 
 

Drupal is a registered trademark of Dries Buytaert.