I would like to know what's the best way to add differents languages in my website?
https://blog.logrocket.com/complete-guide-internationalization-nextjs/
I followed this tutorial to do it with Lingui, but it use getStaticPaths & getStaticProps
And since that... my router.push() is so slow... more slower than before. So I don't really like...
What's your approach to do it? Thanks
`export const getStaticProps: GetStaticProps = async (ctx) => {
const translation = await loadTranslation(
ctx.locale!,
process.env.NODE_ENV === "production"
);
return {
props: {
translation,
},
};
};
export const getStaticPaths: GetStaticPaths<{ slug: string }> = async () => {
return {
paths: [], //indicates that no page needs be created at build time
fallback: "blocking", //indicates the type of fallback
};
};`