【发布时间】:2022-07-14 02:10:39
【问题描述】:
我正在使用 Next.js 和以下配置。
module.exports = {
debug: true,
backend: {
backends: [HttpBackend],
backendOptions: [
// { expirationTime: 60 * 60 * 1000 },
{
loadPath: `${url}/locales/{{lng}}/{{ns}}.json`,
crossDomain: true,
requestOptions: {
mode: 'no-cors',
cache: 'no-store',
},
expirationTime: 60 * 1000,
},
],
},
serializeConfig: false,
use: [ChainedBackend],
i18n: {
defaultNS: 'common',
defaultLocale: 'en',
locales: ['en'],
ns: ['common'],
},
};
每当我将更新推送到 api 时。它应该反映 Nextjs 中的这些变化。现在我每次更新命名空间配置时都需要重新启动服务器
【问题讨论】:
标签: reactjs next.js internationalization i18next next-i18next