* change to setting envars rather than passing in via CLI * update nx to latest patch version * add env files for token-e2e, fix lint and ts errors * move generate functions to mocs for trading e2e to avoid violating boundary rules * add jsx compiler option for trading-e2e * downgrade nextjs * add testing-library to types declaration where required
33 lines
688 B
TypeScript
33 lines
688 B
TypeScript
import i18n from 'i18next';
|
|
import LanguageDetector from 'i18next-browser-languagedetector';
|
|
import { initReactI18next } from 'react-i18next';
|
|
|
|
import dev from './translations/dev.json';
|
|
|
|
i18n
|
|
.use(LanguageDetector)
|
|
.use(initReactI18next)
|
|
.init({
|
|
// we init with resources
|
|
resources: {
|
|
en: {
|
|
translations: {
|
|
...dev,
|
|
},
|
|
},
|
|
},
|
|
lng: undefined,
|
|
fallbackLng: 'en',
|
|
debug: true,
|
|
// have a common namespace used around the full app
|
|
ns: ['translations'],
|
|
defaultNS: 'translations',
|
|
keySeparator: false, // we use content as keys
|
|
|
|
interpolation: {
|
|
escapeValue: false,
|
|
},
|
|
});
|
|
|
|
export default i18n;
|