Hello, so i'm trying to basically render a page through container API with i18n enabled and with a [...lang] param:
export async function GET({ params, props }: APIContext) {
const { post } = props as Props;
const { lang } = params as Params;
if (!lang) {
return new Response(null, { status: 404 });
}
const container = await experimental_AstroContainer.create();
return await container.renderToResponse(FileToRender, {
routeType: "page",
partial: false,
props: { post: post },
params: {
lang: "en",
slug: getBlogPostSlug("en", post),
},
});
//return new Response(content, { status: 200 });
}
the structure is: pages/[...lang]/blog/posts/[...slug]/FileToRender.astro
However i'm getting this error:
11:26:22 [ERROR] [MissingLocaleError] The locale/path `undefined` does not exist in the configured `i18n.locales`.
Stack trace:
at getLocaleRelativeUrl
...
Am i doing something wrong or this is not actually supported?