Internationalization(Multilingual) in the JSS sample app for Next.js
A JSS Next.js application created based on the
Next.js sample app comes preconfigured with the necessary settings to enable
internationalization (i18n).
JSS Next.js applications support internationalized routing with sub-path routing. Domain routing requires custom implementat
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
Next.js JSS application, in the file next.config.js add this code
i18n: {
locales: ['en', 'da-DK'],
defaultLocale: packageConfig.language,
}
![Sitecore implementation agency](https://sitecoredevservices.com/wp-content/uploads/2023/07/image-1-1.png)
The value is set to the value you configured in the file package.json for the config.language
![Sitecore implementation agency](https://sitecoredevservices.com/wp-content/uploads/2023/07/image2-1.png)
Create a MultilingualComponent in components file in JSS application
![Sitecore implementation agency](https://sitecoredevservices.com/wp-content/uploads/2023/07/image3-1.png)