Skip to content

Kirby 5.0.4

Locale::get()

Returns the current locale value for a specified or for all locale categories

Locale::get(int|string $category = 6): array|string

Parameters

Name Type Default Description
$category intorstring 6 Locale category constant or constant name

Return types

arrayorstring

Associative array if `LC_ALL` was passed (default), otherwise string

Exceptions

Type Description
Kirby\Exception\Exception If the locale cannot be determined
Kirby\Exception\InvalidArgumentException If the provided locale category is invalid

Parent class

Kirby\Toolkit\Locale