Skip to content

LanguageRules::validLanguageCode()

Validates if the language code is formatted correctly

LanguageRules::validLanguageCode(Kirby\Cms\Language $language): bool

Parameters

Name Type Default
$language * Kirby\Cms\Language

Return type

bool

Exceptions

Type Description
Kirby\Exception\InvalidArgumentException If the language code is not valid

Parent class

Kirby\Cms\LanguageRules