protected function translateRoutes(array $routes = [])
    {
        foreach ($routes as $routeKey => $routeParams) {
            if (isset($routeParams['description'])) {
                $routes[$routeKey]['description']
                    = $this->translator->translate(
                    $routeParams['description']
                );
            }
            if (isset($routeParams['short_description'])) {
                $routes[$routeKey]['short_description']
                    = $this->translator->translate(
                    $routeParams['short_description']
                );
            }
            if (isset($routeParams['options_descriptions'])) {
                foreach (
                    $routeParams['options_descriptions'] as
                    $optionKey => $optionText
                ) {
                    $routes[$routeKey]['options_descriptions'][$optionKey]
                        = $this->translator->translate(
                        $optionText
                    );
                }
            }
        }

        return $routes;
    }
protected function translateRoutes(array $routes = [])
    {
        foreach ($routes as $routeKey => $routeParams) {
            if (isset($routeParams['description'])) {
                $routes[$routeKey]['description']
                    = $this->translator->translate(
                    $routeParams['description']
                );
            }
            if (isset($routeParams['short_description'])) {
                $routes[$routeKey]['short_description']
                    = $this->translator->translate(
                    $routeParams['short_description']
                );
            }
            if (isset($routeParams['options_descriptions'])) {
                foreach (
                    $routeParams['options_descriptions'] as
                    $optionKey => $optionText
                ) {
                    $routes[$routeKey]['options_descriptions'][$optionKey]
                        = $this->translator->translate(
                        $optionText
                    );
                }
            }
        }

        return $routes;
    }
protected function translateRoutes ( array $ routes = [ ] ) { foreach ( $ routes as $ routeKey => $ routeParams ) { if ( isset ( $ routeParams [ 'description' ] ) ) { $ routes [ $ routeKey ] [ 'description' ] = $ this -> translator -> translate ( $ routeParams [ 'description' ] ) ; } if ( isset ( $ routeParams [ 'short_description' ] ) ) { $ routes [ $ routeKey ] [ 'short_description' ] = $ this -> translator -> translate ( $ routeParams [ 'short_description' ] ) ; } if ( isset ( $ routeParams [ 'options_descriptions' ] ) ) { foreach ( $ routeParams [ 'options_descriptions' ] as $ optionKey => $ optionText ) { $ routes [ $ routeKey ] [ 'options_descriptions' ] [ $ optionKey ] = $ this -> translator -> translate ( $ optionText ) ; } } } return $ routes ; }
Translate the route texts

@param array $routes

@return array
Translate the route texts