$language->code()

Returns the iso language code

  • return (string)

Example

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