public function detectLocaleFromTemplateLocale(Locale $locale)
    {
        $bestMatchingLocale = $this->localeCollection->findBestMatchingLocale($locale);

        if ($bestMatchingLocale !== null) {
            return $bestMatchingLocale;
        }

        return $this->localizationService->getConfiguration()->getDefaultLocale();
    }