From 061b565f7cdb55f773327210e272b816c0589e4c Mon Sep 17 00:00:00 2001 From: jyha00 Date: Thu, 10 Jul 2025 16:49:39 +0900 Subject: [PATCH] =?UTF-8?q?toast=20=EB=A9=94=EC=84=B8=EC=A7=80=20=ED=86=B5?= =?UTF-8?q?=ED=95=A9=EC=9D=84=20=EC=9C=84=ED=95=9C=20i18n=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/layout.tsx | 21 ++++++++++++++++++--- apps/wr/package.json | 2 ++ apps/wr/public/locales/ko/message.json | 19 +++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 apps/wr/public/locales/ko/message.json diff --git a/apps/wr/app/layout.tsx b/apps/wr/app/layout.tsx index cb930d6f7..188692837 100644 --- a/apps/wr/app/layout.tsx +++ b/apps/wr/app/layout.tsx @@ -3,23 +3,38 @@ import { BaseLayout } from "@common/components"; import "./globals.css"; import { StoreProvider } from "./store"; import { MainDiv } from "@common/business_components"; +import koBase from '../public/locales/ko/message.json'; +import i18next from "i18next"; +import { I18nextProvider } from "react-i18next"; export default function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { + i18next.init({ + lng: 'ko', + fallbackLng: 'ko', + resources: { + ko: { + base: koBase, + }, + } + }); + return ( + - + {children} - + + - + ); } diff --git a/apps/wr/package.json b/apps/wr/package.json index 44ba5a06b..78f9dfa95 100644 --- a/apps/wr/package.json +++ b/apps/wr/package.json @@ -16,11 +16,13 @@ "@tanstack/react-table": "^8.21.2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", + "i18next": "^25.3.2", "lucide-react": "^0.474.0", "moment": "^2.30.1", "next": "15.1.7", "react-hook-form": "^7.54.2", "react-hot-toast": "^2.5.2", + "react-i18next": "^15.6.0", "tailwind-merge": "^3.0.1", "tailwindcss-animate": "^1.0.7", "tus-js-client": "^4.3.1", diff --git a/apps/wr/public/locales/ko/message.json b/apps/wr/public/locales/ko/message.json new file mode 100644 index 000000000..78219a539 --- /dev/null +++ b/apps/wr/public/locales/ko/message.json @@ -0,0 +1,19 @@ +{ + "deleteMsg" : "{{name}}가 삭제되었습니다.", + "insertMsg": "{{name}}가 저장되었습니다.", + "updateMsg": "{{name}}가 수정되었습니다.", + "errorMsg": "{{name}} 중 오류가 발생했습니다.", + "fileErrMsg": "빈 파일 또는 파일 오류입니다.", + "selectErrMsg": "{{name}}을(를) 선택해주세요.", + "noChangedErrMsg": "변경사항이 없습니다.", + "dateErrMsg": "시작년도를 종료년도 이후로 설정할 수 없습니다.", + "fileDateErrMsg": "파일업로드 이전에 등록년도를 작성해주세요.", + + "alreadyInsertedErrMsg": "사업자번호 {{num}}(은)는 이미 등록되었습니다. 다시 등록해주세요.", + "saveRowErrMsg": "수정을 원하는 행을 선택하고 저장버튼을 눌러주세요.", + "costCalcErrMsg":"공사비 계산 진행 후 저장을 눌러주세요", + "maxYearErrMsg": "최대 {{year}}년까지 선택가능합니다.", + "checkQtyMsg": "요구수량(M3/d)을 확인해주세요 계산할수 없습니다." + +} +