protected function getDetectedLocale(HTTPRequest $request)
    {
        // Only detect on home page (landing page)
        if ($request->getURL() !== '') {
            return null;
        }
        // Respect config disable
        if (!FluentDirectorExtension::config()->get('detect_locale')) {
            return null;
        }

        /** @var LocaleDetector $detector */
        $detector = Injector::inst()->get(LocaleDetector::class);
        $localeObj = $detector->detectLocale($request);
        if ($localeObj) {
            return $localeObj->getLocale();
        }
        return null;
    }