add next-i18next as i18n framework

This commit is contained in:
myl7
2022-02-06 06:18:26 +08:00
parent afc691cee7
commit e28ce30987
10 changed files with 655 additions and 18 deletions
+9
View File
@@ -1,5 +1,6 @@
import Head from 'next/head'
import { useRouter } from 'next/router'
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
import siteConfig from '../config/site.config'
import Navbar from '../components/Navbar'
@@ -32,3 +33,11 @@ export default function Folders() {
</div>
)
}
export async function getStaticProps({ locale }) {
return {
props: {
...(await serverSideTranslations(locale, ['common']))
}
}
}