$language
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.
- $language->baseUrl()
- $language->clone()
- $language->code()
- $language->direction()
- $language->exists()
- $language->hasNext()
- $language->hasPrev()
- $language->id()
- $language->indexOf()
- $language->isDefault()
- $language->isDeletable()
- $language->isFirst()
- $language->isLast()
- $language->isNth()
- $language->kirby()
- $language->locale()
- $language->name()
- $language->next()
- $language->nextAll()
- $language->path()
- $language->pattern()
- $language->prev()
- $language->prevAll()
- $language->root()
- $language->router()
- $language->siblings()
- $language->slugs()
- $language->smartypants()
- $language->toArray()
- $language->translations()
- $language->url()
- $language->variable()
- Language::loadRules()
- new Language()
Details
To have access to the methods of the $language
object, you need to get a language object first:
Default language
The current language
Any particular language
Examples
With the object in place, you can use it like this: