1.2.0 • Published 4 years ago
@staccx/next-i18n v1.2.0
Package template
i18next-parser.config.js
const { i18n } = require("./next-i18next.config")
module.exports = {
  locales: i18n.locales,
  output: "i18n/$LOCALE/$NAMESPACE.json",
  defaultNamespace: "common",
  lexers: {
    js: ["JsxLexer"],
    ts: ["JsxLexer"],
    jsx: ["JsxLexer"],
    tsx: ["JsxLexer"],
  },
  verbose: true,
}next-i18next.config.js
const path = require("path")
module.exports = {
  i18n: {
    defaultLocale: "no",
    locales: ["no"],
  },
  localePath: path.resolve("./i18n"),
  returnObjects: true,
}next.config.js
const { i18n } = require("./next-i18next.config")
module.exports = {
  i18n,
  reactStrictMode: true,
}