0
0
mirror of https://github.com/yude-jp/yude.jp synced 2025-10-12 19:28:43 +09:00

Multilingual suport (hcunews/)

This commit is contained in:
2021-05-27 10:31:55 +09:00
parent 2e4456cb91
commit 9ad748affa
3 changed files with 24 additions and 2 deletions

View File

@@ -4,7 +4,8 @@ import { useRouter } from 'next/router'
import React from "react"
import ReactMarkdown from "react-markdown"
import gfm from 'remark-gfm';
import input from '../docs/hcunews.md'
import ja from '../docs/hcunews/ja.md'
import en from '../docs/hcunews/en.md'
export default function Tos(props) {
const router = useRouter()
@@ -15,7 +16,11 @@ export default function Tos(props) {
<Layout title={hcunews}>
<div>
<h1>{hcunews}</h1>
<ReactMarkdown plugins={[gfm]} children={input} />
{lang === 'ja' ? (
<ReactMarkdown plugins={[gfm]} children={ja} />
) : (
<ReactMarkdown plugins={[gfm]} children={en} />
)}
</div>
</Layout>
)