Apply i18n to client components

This commit is contained in:
Takeshi Kimata
2024-05-03 17:39:07 +09:00
parent 72c71efedc
commit e25acad76c
8 changed files with 146 additions and 83 deletions

View File

@@ -1,9 +1,29 @@
import ProjectsPage from "./ProjectsPage";
import { useTranslations } from "next-intl";
export default function Page() {
const t = useTranslations("Projects");
const messages = {
projects: t("projects"),
project: t("project"),
newProject: t("new_project"),
editProject: t("edit_project"),
deleteProject: t("delete_project"),
id: t("id"),
name: t("name"),
detail: t("detail"),
lastUpdate: t("last_update"),
actions: t("actions"),
projectName: t("project_name"),
projectDetail: t("project_detail"),
close: t("close"),
create: t("create"),
update: t("update"),
pleaseEnter: t("please_enter"),
};
return (
<>
<ProjectsPage />
<ProjectsPage messages={messages} />
</>
);
}