dde272c4b8
i18n - Build Validation / Validate i18n Builds (24) (push) Has been cancelled
CI - Node.js / Lint (24) (push) Has been cancelled
CI - Node.js / Build (24) (push) Has been cancelled
CI - Node.js / Test (24) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (24) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 24) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 24) (push) Has been cancelled
CD - Docker - GHCR Images / Build and Push Images (push) Has been cancelled
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;
|