$site->languages()

Returns the collection of available languages for multi-language sites

  • return ($languages)

Example

<ul>
  <?php foreach($site->languages() as $language): ?>
  <li>
    <a href="<?php echo $language->url() ?>">
      <?php echo html($language->name()) ?>
    </a>
  </li>
  <?php endforeach ?>
</ul>