Reference

Guide

$language->name()

Returns the human-readable name of the language

$language->name(): string

Return type

string

Example

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

Source code

kirby/src/Cms/Language.php#L324