Hiding multilanguage link

Hej hej … is it somehow possible to hide the link when the different multilanguage page is active?

Like: A user is at the page with german content … here i want to hide the link to switch to german language and let show only the link to the english content.

`<?php foreach($site->languages() as $lang): ?>
<?php echo $lang->name() ?>

<?php endforeach ?>`

i tryd now for hours to find an solution … now i just gave up … XD
Would be nice if someone could help me here with an hint. :wink:


Yeah, with a little if statement:

<?php foreach($site->languages() as $lang): ?>
  <?php if ($site->language() != $lang): ?>
    <a href="<?php echo $page->url($lang->code()) ?>"><?php echo $lang->name() ?></a> 
  <?php endif ?>
<?php endforeach ?>

Or if that does not work, add the code() method to the two objects to compare.

WoW … just works perfect.
Thanks alot …

$site->language() != $lang):

Now i know how to … :wink: