private function resolveHeader()
    {
        if (null === static::$languages) {
            $httpLanguages = $this->request->server(config('localizer.request.header', 'HTTP_ACCEPT_LANGUAGE'));

            if (empty($httpLanguages)) {
                static::$languages = [];
            } else {
                $accepted = preg_split('/,\s*/', $httpLanguages);

                static::$languages = empty($languages = $this->buildCollection($accepted, $languages = []))
                    ? null
                    : array_keys($languages)[0];
            }
        }

        return static::$languages;
    }