Skip to content

Kirby 3.9.8

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