$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

<?php echo $site->language()->name() ?>

Return the name of another language

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