for my SSG page I need to pass a parameter which is language to my api call function which is inside generateStaticParams
function, I have stored language inside cookies and I can not access that, is there a way I can pass params to my function?
export async function generateStaticParams() {
const getAllCategories = await getCategories(); // this needs language
return getAllCategories.map((category: Category) => ({
id: category.id,
category: category.groupName,
}));
}