forked from ethereum/ethereum-org-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next-i18next.config.js
26 lines (24 loc) · 1.05 KB
/
next-i18next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const i18nConfig = require("./i18n.config.json")
const BUILD_LOCALES = process.env.BUILD_LOCALES
// Supported locales defined in `i18n.config.json`
const locales = BUILD_LOCALES
? BUILD_LOCALES.split(",")
: i18nConfig.map(({ code }) => code)
/** @type {import('next-i18next').UserConfig} */
module.exports = {
i18n: {
defaultLocale: "en",
// supported locales defined in `i18n.config.json`
locales,
},
// define custom location for intl files, otherwise default to public/locales (https://github.com/i18next/next-i18next#2-translation-content)
localePath: "./src/intl",
// see updates to your translation JSON files without having to restart your development server each time
reloadOnPrerender: true,
// Language codes to lookup, given set language is 'en-US': 'all' --> ['en-US', 'en', 'dev'], 'currentOnly' --> 'en-US', 'languageOnly' --> 'en'
load: "currentOnly",
// Language will be lowercased EN --> en while leaving full locales like en-US
cleanCode: true,
// Language will be lowercased eg. en-US --> en-us
lowerCaseLng: true,
}