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', 'de', 'nl', 'it'])],
9 localeDetection: false,
10 },
11 // Load same lang file for every namespaces
12 localePath: (locale, _namespace) => `./locales/${locale}.json`,
13 ns: ['common'],
14 localeDetection: false,
15 fallbackLng: ['en', 'fr'],
16 trailingSlash: true,
17 serializeConfig: false,
18 interpolation: {
19 escapeValue: false, // react already safes from xss
20 },
21};