Files
calendar/packages/i18n/next-i18next.config.js

19 lines
463 B
JavaScript

const path = require("node:path");
const i18n = require("../../i18n.json");
/** @type {import("next-i18next").UserConfig} */
const config = {
i18n: {
defaultLocale: i18n.locale.source,
locales: i18n.locale.targets.concat([i18n.locale.source]),
},
fallbackLng: {
default: ["en"],
zh: ["zh-CN"],
},
reloadOnPrerender: process.env.NODE_ENV !== "production",
localePath: path.resolve(__dirname, "./locales"),
};
module.exports = config;