Internationalization with Gatsby

Hi there,
I know this question is probably more about Gatsby than Dato - but I couldn’t find any guide on doing this, so I assume it will be helpful for other people.

Let’s get to the point - I have to add internationalization support for existing Gatsby site. I have products stored as a records in DatoCMS. I have gatsby-node file which generates each page for each node. But I can’t figure out how to make it to generate 2 version of the same record - 1 without any suffix, and 1 with /en/product suffix. Here is my gatsby-node file, and template for product page:


I hope someone would explain it nicely to me. Thanks in advance!

hey @leeszczuu have you seen this documentation: https://github.com/datocms/gatsby-source-datocms#localized-fields

I think that you should create the double page in the gatsby-node (if you want to have multiple pages) otherwise maybe look into routing: https://www.gatsbyjs.org/docs/routing/ ?