forked from usebasejump/basejump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi18n.js
23 lines (23 loc) · 914 Bytes
/
i18n.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* HACK: Known issue with importing with the newest NextJS version.
* Can be removed once resolved: https://github.com/aralroca/next-translate/issues/851
*/
const workaround = require("next-translate/lib/cjs/plugin/utils.js");
workaround.defaultLoader =
"(lang, ns) => import(`@next-translate-root/content/locales/${lang}/${ns}.json`).then((m) => m.default)";
module.exports = {
locales: ["en"],
defaultLocale: "en",
pages: {
"/login": ["authentication", "content"],
"/signup": ["authentication", "content"],
"/invitation": ["dashboard", "content"],
"rgx:^/dashboard": ["dashboard"],
"*": ["content"],
},
// HACK: Add this back in once resolved
// loadLocaleFrom: (lang, ns) =>
// // You can use a dynamic import, fetch, whatever. You should
// // return a Promise with the JSON file.
// import(`./content/locales/${lang}/${ns}.json`).then((m) => m.default),
};