frontend/next-i18next.config.js (view raw)
1/** @type {import('next-i18next').UserConfig} */
2
3const {FALLBACK_LANGUAGE = 'en'} = process.env;
4
5module.exports = {
6 i18n: {
7 defaultLocale: FALLBACK_LANGUAGE,
8 locales: [...new Set([FALLBACK_LANGUAGE, 'en', 'fr', 'nl'])],
9 },
10 // Load same lang file for every namespaces
11 localePath: (locale, _namespace) => `./locales/${locale}.json`,
12 ns: ['common'],
13 localeDetection: false,
14 fallbackLng: ['fr'],
15 trailingSlash: true,
16 serializeConfig: false,
17 interpolation: {
18 escapeValue: false, // react already safes from xss
19 },
20};