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;
    }
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;
    }
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 ; }
Returns the translated route for an url and the attributes given and a locale

@param  string  $url
@param  array   $attributes
@param  string  $locale

@return string|false
Returns the translated route for an url and the attributes given and a locale