Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 2x | import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import enTranslation from './locales/en.json';
import deTranslation from './locales/de.json';
i18n
.use(initReactI18next)
.init({
resources: {
en: { translation: enTranslation },
de: { translation: deTranslation }
},
lng: 'de', // default locale is German; portfolio targets a German-speaking market
fallbackLng: 'en',
interpolation: { escapeValue: false }, // React already escapes values; this prevents double-escaping
compatibilityJSON: 'v3' // matches the plural-key format used in the locale JSON files
});
export default i18n;
|