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:
+11
-3
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user