Skip to content

Kirby 4.3.0


The $language object represents a single language in a multi-language Kirby setup. You can, for example, use the methods of this class to get the name or locale of a language, check for the default language, get translation strings and many more things.


To have access to the methods of the $language object, you need to get a language object first:

Default language

$language = $kirby->defaultLanguage();

The current language

$language = $kirby->language();

Any particular language

$language = $kirby->language('fr');


With the object in place, you can use it like this:

Get the language code

echo $language->code();

Get the language name

echo $language->name();

Get the available translations