Arcanedev\Localization\Utilities\RouteTranslator::trans PHP Method

trans() public method

Translate routes and save them to the translated routes array (used in the localize route filter).
public trans ( string $route, string | null $locale = null ) : string
$route string
$locale string | null
return string
    public function trans($route, $locale = null)
    {
        if (!in_array($route, $this->translatedRoutes)) {
            $this->translatedRoutes[] = $route;
        }
        return $this->translate($route, $locale);
    }