Vue Router Add child to parent

Hello everyone,
I have the problem that when adding a route, it is not added as a child route. I built the project modularly so that each component should have its own folder at the end.

My code to add the route is as follows:

main.ts

import { createApp } from ‘vue’
import router from ‘@/router’
import store from ‘@/store’

import { registerModules } from “@/register-modules”;
import cartModule from ‘@/modules/cart’
import App from ‘./app.view.vue’

registerModules({
cart: cartModule
});

const app = createApp(App)

app.use(store)
app.use(router)
app.mount(’#app’)

export default app;

router.ts

import { createRouter, createWebHistory, RouteRecordRaw } from ‘vue-router’
import MainView from ‘@/views/main-view.view.vue’

const lang = localStorage.getItem(‘language’) || ‘en’;

const routes = [
{
path : ‘/’,
name : ‘Start’,
redirect: /${lang},
},
{
path : ‘/:lang’,
name : ‘lang’,
component : MainView,
children : []
},
{
name : “CatchAll”,
path : “/:catchAll(.*)”,
redirect: /${lang},
}
];

const router = createRouter({
history: createWebHistory(process.env.BASE_URL),
routes
})

export default router

register-module.ts

import router from ‘@/router’
import store from ‘@/store’

const registerModule = (name, module) => {
if (module.store) {
store.registerModule(name, module.store);
}
if (module.router) {
module.router(router);
}
};

export const registerModules = modules => {
Object.keys(modules).forEach(moduleKey => {
const module = modules[moduleKey];
registerModule(moduleKey, module);
});
};

router.ts for cart module

import { RouteRecordRaw } from ‘vue-router’
const HomeView = () => import(’./views/home/home.view.module.vue’);

const moduleRoute: Array = [
{
path : “/cart”,
name : “cart”,
component : HomeView,
children: [
{
name : “home-child”,
path : “home”,
component : HomeView
}
]
},
{
path : “/product”,
name : “product”,
component : HomeView,
children: [
{
name : “home-child-2”,
path : “home”,
component : HomeView
}
]
}
]

export default router => {
moduleRoute.forEach(route => {
router.addRoute(‘lang’, route);
});
}

As said, the routes are not added to the parent element ‘lang’ as a child.

Does anyone have an idea what this could be?