Suncel home pageSuncel logoSuncel v1.1
  1. How to

internationalization > How to

How to 

This section will present how to configure internationalization (multiple locales) on your project using Suncel CMS.

Suncel is using the Next.js built-in i18n routing.

Dashboard

The first step is to add the additional languages to your Dashboard. Have a look here

Next config

We recommend you look at the Next.js documentation.

You just need to add languages to the languages array in next.config.js

const nextConfig = {
  i18n: {
    // These are all the locales you want to support in
    // your application
    locales: ['en', 'fr'],
    // This is the default locale you want to be used when visiting
    // a non-locale prefixed path e.g. `/hello`
    defaultLocale: 'en'
  },
...
}

Fetch localized data

You will be able to target the local needed via the language attribute of your fetch utility(getPage, GetPageByPath ...).