mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-26 17:02:27 -04:00
23 lines
465 B
TypeScript
23 lines
465 B
TypeScript
import i18n from 'i18next';
|
|
import { initReactI18next } from 'react-i18next';
|
|
|
|
i18n
|
|
.use(initReactI18next)
|
|
.init({
|
|
debug: true,
|
|
defaultNS: 'translations',
|
|
fallbackLng: 'en',
|
|
interpolation: {
|
|
escapeValue: false
|
|
},
|
|
lng: 'en',
|
|
ns: ['intro', 'translations'],
|
|
resources: { en: { intro: {}, translations: {} } },
|
|
returnNull: false
|
|
})
|
|
.catch((error: Error) => {
|
|
throw Error(error.message);
|
|
});
|
|
|
|
export default i18n;
|