Question

How to build Multilingual Website using NextJs & Contentstack?

  • 20 September 2023
  • 1 reply
  • 89 views

Badge

I have a website running with NextJs with one language, and now looking to make it multilingual with language switcher.

I got one article to do so but that’s with Gatsby but I doubt that will be helpful in my case.  https://www.contentstack.com/docs/developers/sample-apps/build-a-multilingual-website-using-gatsby-and-contentstack#enable-multilingual-in-your-gatsby-starter

Any reference to that will be helpful. 


1 reply

If you are using Javascript SDK, there is a method to query a specific language. Passing selected language from language switcher to this query, can fetch content in the selected language.

Stack.ContentType('content_type_uid').Query().language('fr-fr').toJSON().find()


 

Reply