Share common locales between pages

Viewed 8

So in next-i18next it is common to load locales like this:

export async function getServerSideProps ({ locale }) {
  return {
    props: {
      ...(await serverSideTranslations(locale, ['home', 'footer', 'header']))
    }
  }
}

So what I was wondering (without writing my own wrapper) if next-i18next supports something to load footer and header for ALL pages, because I need them always.

In Next.js you have your _app.js I can do as above but that would override the server side translations in other pages.

So I'd like to merge common locales with the specific ones needed in the pages directory.

Thanks in advance!

0 Answers
Related