Skip to content

Kirby 5.0.4

$visitor->acceptedLanguage()

Sets the accepted language if provided or returns the user's accepted language otherwise

$visitor->acceptedLanguage(string|null $acceptedLanguage = null): Kirby\Http\Visitor|Kirby\Toolkit\Obj|null

Parameters

Name Type Default
$acceptedLanguage stringornull null

Return types

Kirby\Http\VisitororKirby\Toolkit\Objornull

This method modifies the existing $visitor object it is applied to and returns it again.

Parent class

Kirby\Http\Visitor