$site->language($code = null)

Returns the current language by default or any other language when a language code is given

  • $code (string)
  • return ($language)

Example

Return the name of the current language

<?= $site->language()->name() ?>

Return the name of another language

<?= $site->language('de')->name() ?>

Is something missing or incorrect? Edit this page on Github…