feat: Add i18n support for Chinese language (#142)

* feat: Add i18n support for Chinese language

* fix: locale not working in Docker environment
This commit is contained in:
Jungley
2023-03-25 23:42:48 +08:00
committed by GitHub
parent 932853f1ba
commit 92eab6c634
26 changed files with 320 additions and 40 deletions
+11 -3
View File
@@ -1,8 +1,16 @@
import { Html, Head, Main, NextScript } from 'next/document'
import { Html, Head, Main, NextScript, DocumentProps } from 'next/document'
import i18nextConfig from '../next-i18next.config'
export default function Document() {
type Props = DocumentProps & {
// add custom document props
}
export default function Document(props: Props) {
const currentLocale =
props.__NEXT_DATA__.locale ??
i18nextConfig.i18n.defaultLocale
return (
<Html lang="en">
<Html lang={currentLocale}>
<Head>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-title" content="Chatbot UI"></meta>