protected function findTranslatedRouteByPath($path, $url_locale)
    {
        // check if this url is a translated url
        foreach ($this->translatedRoutes as $translatedRoute) {
            if ($this->translator->trans($translatedRoute, [], $url_locale) == rawurldecode($path)) {
                return $translatedRoute;
            }
        }

        return false;
    }
protected function findTranslatedRouteByPath($path, $url_locale)
    {
        // check if this url is a translated url
        foreach ($this->translatedRoutes as $translatedRoute) {
            if ($this->translator->trans($translatedRoute, [], $url_locale) == rawurldecode($path)) {
                return $translatedRoute;
            }
        }

        return false;
    }
protected function findTranslatedRouteByPath ( $ path , $ url_locale ) { // check if this url is a translated url foreach ( $ this -> translatedRoutes as $ translatedRoute ) { if ( $ this -> translator -> trans ( $ translatedRoute , [ ] , $ url_locale ) == rawurldecode ( $ path ) ) { return $ translatedRoute ; } } return false ; }
Returns the translated route for the path and the url given.

@param string $path       Path to check if it is a translated route
@param string $url_locale Language to check if the path exists

@return string|false Key for translation, false if not exist
Returns the translated route for the path and the url given .