Skip to content

Instantly share code, notes, and snippets.

@weianofsteel
Last active April 17, 2021 08:10
Show Gist options
  • Save weianofsteel/e0a2670d7d57cfe752f1f6fea07d0052 to your computer and use it in GitHub Desktop.
Save weianofsteel/e0a2670d7d57cfe752f1f6fea07d0052 to your computer and use it in GitHub Desktop.
NextI18Next(i18n.js)
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