Skip to content

Kirby 5.1.1

$language->name()

Returns the human-readable name of the language

$language->name(): string

Return type

string

This method modifies the existing $language object it is applied to and returns it again.

Parent class

Kirby\Cms\Language

Examples

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