Hello,
I have a multilingual site, with the selectors displaying in a list.
<nav class="nav lang-toggle">
<ul>
<?php foreach($site->languages() as $language): ?>
<li<?php e($site->language() == $language, ' class="active"') ?>>
<a href="<?php echo $language->url() ?>">
<?php echo html($language->name()) ?>
</a>
</li>
<?php endforeach ?>
</ul>
</nav>
Which yeilds this on the front-end:
This works fine, with two options of English and Korean to select between. But I am trying to achieve a toggle that only displays the Korean switch when on the English version of the site, and vice versa.
I don’t know how to call and display the alternative $site->language
The language switch on getkirby.com doesn’t provide a means to do this, that I could see.
Any help is very much appreciated!