plane/web/next-i18next.config.js

19 lines
540 B
JavaScript
Raw Permalink Normal View History

2023-10-09 12:56:24 +00:00
// @ts-check
/**
* @type {import('next-i18next').UserConfig}
*/
module.exports = {
// https://www.i18next.com/overview/configuration-options#logging
debug: process.env.NODE_ENV === "development",
i18n: {
defaultLocale: "en",
locales: ["en", "fr"],
},
/** To avoid issues when deploying to some paas (vercel...) */
localePath:
typeof window === "undefined" ? require("path").resolve("./public/locales") : "/locales",
react: { useSuspense: false },
reloadOnPrerender: process.env.NODE_ENV === "development",
};