next-drupal icon indicating copy to clipboard operation
next-drupal copied to clipboard

DRUPAL_FRONT_PAGE for second locale not working

Open trickreich opened this issue 2 years ago • 1 comments

fixed it with following snippet:

export async function getStaticProps(
  context
): Promise<GetStaticPropsResult<NodePageProps>> {
  if (context.locale === "en" && !context.params.slug) {
    context.params.slug = ["node/1"];
  }
 ....
}

trickreich avatar Apr 15 '22 12:04 trickreich

next.config.js i18n

  i18n: {
    locales: ["de", "en"],
    defaultLocale: "de",
  },

trickreich avatar Apr 15 '22 12:04 trickreich