Skip to content

Kirby 4.5.0

user.changeLanguage:before

/site/config/config.php
return [
    'hooks' => [
        'user.changeLanguage:before' => function (Kirby\Cms\User $user, string $language) {
            // your code goes here
        }
    ]
]

Parameters

Parameter Type
$user Kirby\Cms\User
$language string