Files
lobehub/next-i18next.config.js
canisminor1990 8ecd401530 feat: Add fallback language, modify React suspense settings, enable strict mode, and update dependencies
The changes include modifying the configuration file, package.json file, and several page files. The fallback language is added, React suspense is disabled, strict mode is enabled, and dependencies are updated. The getStaticProps function in index.page.tsx is replaced with getServerSideProps.
2023-07-16 12:32:31 +08:00

18 lines
443 B
JavaScript

const i18n = require('./.i18nrc');
/** @type {import('next-i18next').UserConfig} */
module.exports = {
debug: process.env.NODE_ENV === 'development',
fallbackLng: {
default: ['en'],
zh_TW: ['zh_CN'],
},
i18n: {
defaultLocale: i18n.entryLocale,
locales: [i18n.entryLocale, ...i18n.outputLocales],
},
react: { useSuspense: false },
reloadOnPrerender: process.env.NODE_ENV === 'development',
strictMode: true,
};