Add translation for battlesuit list page

This commit is contained in:
Sakura Knoll
2022-01-03 15:18:47 +09:00 Unverified
parent d5610fc964
commit ac143a81c0
20 changed files with 331 additions and 87 deletions
+17
View File
@@ -0,0 +1,17 @@
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
export function getI18NProps(
locale: string = 'en-US',
nameSpaces: string[] = []
) {
return serverSideTranslations(locale, ['common', ...nameSpaces])
}
export function generateI18NPaths(paths: { params: any; locale?: string }[]) {
return paths.reduce<{ params: any; locale?: string }[]>((newPaths, path) => {
newPaths.push(path)
newPaths.push({ ...path, locale: 'ko-KR' })
return newPaths
}, [])
}