Last active
April 17, 2021 08:10
-
-
Save weianofsteel/e0a2670d7d57cfe752f1f6fea07d0052 to your computer and use it in GitHub Desktop.
NextI18Next(i18n.js)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const NextI18Next = require('next-i18next').default | |
const localeSubpaths = require('next/config').default().publicRuntimeConfig | |
const path = require('path') | |
module.exports = new NextI18Next({ | |
defaultLanguage:'en', | |
otherLanguages: ['zhHant', 'fr', 'es'], | |
localeSubpaths:{ | |
zhHant:'cn', | |
fr: 'fr', | |
es: 'es' | |
}, | |
localePath: path.resolve('./public/static/locales') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment