src/Resource.php
public function translate(array $translations)
    {
        foreach ($this->routes as $route) {
            $action = $route->getAction()[1];

            if ($action === "make" && isset($translations["make"])) {
                $route->setPatternWithoutReset(str_replace("make", $translations["make"], $route->getPattern()));
            } elseif ($action === "edit" && isset($translations["edit"])) {
                $route->setPatternWithoutReset(str_replace("edit", $translations["edit"], $route->getPattern()));
            }
        }

        return $this;
    }
public function translate(array $translations)
    {
        foreach ($this->routes as $route) {
            $action = $route->getAction()[1];

            if ($action === "make" && isset($translations["make"])) {
                $route->setPatternWithoutReset(str_replace("make", $translations["make"], $route->getPattern()));
            } elseif ($action === "edit" && isset($translations["edit"])) {
                $route->setPatternWithoutReset(str_replace("edit", $translations["edit"], $route->getPattern()));
            }
        }

        return $this;
    }
public function translate ( array $ translations ) { foreach ( $ this -> routes as $ route ) { $ action = $ route -> getAction ( ) [ 1 ] ; if ( $ action === "make" && isset ( $ translations [ "make" ] ) ) { $ route -> setPatternWithoutReset ( str_replace ( "make" , $ translations [ "make" ] , $ route -> getPattern ( ) ) ) ; } elseif ( $ action === "edit" && isset ( $ translations [ "edit" ] ) ) { $ route -> setPatternWithoutReset ( str_replace ( "edit" , $ translations [ "edit" ] , $ route -> getPattern ( ) ) ) ; } } return $ this ; }
Translate the "make" or "edit" from resources path.

@param string[] $translations
@return self
Translate the make or edit from resources path .