The problem:
In a multilingual site using the waffles theme, the site title and logo are linked to the default language front page instead of the current language front page - so that when you view any page in a non-default language and click on the site title or logo to go to the front page, you are switched from your current language to the default language.
Workaround:
in page.tpl.php, link logo and title to check_url($front_page) instead of $base_path - i.e.,

change

<?php if ($logo): ?> 
            <div id="logo">
              <a href="<?php print $base_path ?>" title="<?php print t('Home') ?>"><img src="<?php print $logo ?>" alt="<?php print t('Home') ?>" /></a>
            </div>
            <?php endif; ?>
            <?php if ($site_name): ?>
            <h1><a href="<?php print $base_path ?>" title="<?php print t('Home'); ?>"><?php print $site_name; ?></a></h1>
            <?php endif; ?>

to

<?php if ($logo): ?> 
            <div id="logo">
              <a href="<?php print check_url($front_page) ?>" title="<?php print t('Home') ?>"><img src="<?php print $logo ?>" alt="<?php print t('Home') ?>" /></a>
            </div>
            <?php endif; ?>
            <?php if ($site_name): ?>
            <h1><a href="<?php print check_url($front_page) ?>" title="<?php print t('Home'); ?>"><?php print $site_name; ?></a></h1>
            <?php endif; ?>

Comments

B.X’s picture

Thanks, it works!