private function findTranslatedRouteByUrl($url, $attributes, $locale)
    {
        if (empty($url)) return false;

        // check if this url is a translated url
        foreach ($this->routeTranslator->getTranslatedRoutes() as $translatedRoute) {
            $translatedUrl = $this->getUrlFromRouteName($locale, $translatedRoute, $attributes);

            if ($this->getNonLocalizedURL($translatedUrl) === $this->getNonLocalizedURL($url))
                return $translatedRoute;
        }

        return false;
    }