public function detectLocale(): self
    {
        $locale = null;

        $detectors = [
            FallbackDetector::class,
            HiddenSegmentDetector::class,
            SegmentDetector::class,
            QueryDetector::class,
        ];

        foreach ($detectors as $detector) {
            $locale = app($detector)->get($this->getScope(), $this->config) ?? $locale;
        }

        $this->locale = $locale;

        Scope::setActiveLocale($locale);

        $this->setApplicationLocale();

        return $this;
    }