由于添加了 basePath ,语言环境文件得到了 404 ,
我尝试过的 i18n.tsx
const NextI18NextInstance = new NextI18Next({
defaultLanguage: 'en',
otherLanguages: ['de'],
fallbackLng: 'en',
localeSubpaths,
localePath: path.resolve('./public/static/locales'),
})
Updated above code with basePath like below ,
const NextI18NextInstance = new NextI18Next({
defaultLanguage: 'en',
otherLanguages: ['de'],
fallbackLng: 'en',
localeSubpaths,
localePath: path.resolve('./<basepath>/public/static/locales'),
})
但这会引发内部服务器错误。