mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-10-24 23:49:06 +08:00
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
23 lines
445 B
TypeScript
23 lines
445 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: ['translations'],
|
|
resources: { en: { translations: {} } },
|
|
returnNull: false
|
|
})
|
|
.catch((error: Error) => {
|
|
throw Error(error.message);
|
|
});
|
|
|
|
export default i18n;
|