Arcanedev\Localization\Utilities\RouteTranslator::findTranslatedRouteByPath PHP Метод

findTranslatedRouteByPath() публичный Метод

Returns the translated route for the path and the url given.
public findTranslatedRouteByPath ( string $path, string $locale ) : false | string
$path string - Path to check if it is a translated route
$locale string - Language to check if the path exists
Результат false | string
    public function findTranslatedRouteByPath($path, $locale)
    {
        // check if this url is a translated url
        foreach ($this->translatedRoutes as $route) {
            if ($this->translate($route, $locale) == rawurldecode($path)) {
                return $route;
            }
        }
        return false;
    }