Language::ensure()
Converts a "user-facing" language code to a Language object
Language::ensure() has been marked as unstable. It might be changed in a future Kirby major or minor release without being considered a breaking change. Use with caution.
Language::ensure(Kirby\Cms\Language|string|null $code = null): Kirby\Cms\Language
Parameters
| Name | Type | Default |
|---|---|---|
| $code | Kirby\Cms\Languageorstringornull |
null
|
Return type
Exceptions
| Type | Description |
|---|---|
Kirby\Exception\NotFoundException |
If the language does not exist |