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: './locales',
13 localeExtension: 'json',
14 localeStructure: '{{lng}}',
15 ns: ['common'],
16 localeDetection: true,
17 fallbackLng: ['en', 'fr'],
18 trailingSlash: true,
19 serializeConfig: false,
20 interpolation: {
21 escapeValue: false, // react already safes from xss
22 },
23};