Internationalization addon broke the "Home" link in my theme.

Permalink 2 users found helpful
I used
<a href="<?php echo DIR_REL?>/">
to automatically link to the homepage. Now, after installing internationalization, I need to change that so that it links to the actual language's homepage, not the "top" homepage (which redirects to the default language's home).
What should I change?

Thanks in advance.

 
PatrickHeck replied on at Permalink Reply
PatrickHeck
In Dashboard click at "Multilingual" and then select "Redirect home page to default language section." at the bottom.
gd42 replied on at Permalink Reply
Maybe I wasn't clear, so here is what I want to do:

I want my logo to link to the home page. In a single language site, it was easy, because the DIR_Rel spat out the correct address, no matter what the actual URL was.

I want the same with a multi-language site, so that the logo links back the _selected_ language's home page.

I want to do hardcode this into the theme's header.php.

Thanks.
PatrickHeck replied on at Permalink Best Answer Reply
PatrickHeck
Ah - ok. I didn't quite get that in the first place. If you want to get the home page of the current pages language-section do this:
<?php $home = DIR_REL;
   if ( Package::getByHandle('multilingual') ) {
               $ms = MultilingualSection::getCurrentSection();
               if (is_object($ms)) {
                  $home = Loader::helper('navigation')->getLinkToCollection($ms, true);
               }
   }?>
<h1><a href="<?=$home?>" >HOME</a></h1>

The first "if" is only necessary to be prevent your theme from breaking if the internationalization add-on is disabled.
gd42 replied on at Permalink Reply
Thanks! That is exactly what I need.
siimr replied on at Permalink Reply
siimr
Thanks a lot!
blueboat replied on at Permalink Reply
I've been using this code for a while now without a hitch, but since internationalization v1.2, this doesn't work anymore (or is it C5.6.1.2?)

<?=$home?> is plain text the URL instead of the variable.

Anyone have any ideas?