diff --git a/src/pages/api/language/en.astro b/src/pages/api/language/en.astro new file mode 100644 index 0000000..44848d6 --- /dev/null +++ b/src/pages/api/language/en.astro @@ -0,0 +1,12 @@ +--- +import { changeLanguage } from "i18next"; + +changeLanguage("en"); + +Astro.cookies.set("Language", "EN", { + path: "/", + sameSite: 'strict' +}); +return Astro.redirect("/"); +--- + \ No newline at end of file diff --git a/src/pages/api/language/jp.astro b/src/pages/api/language/jp.astro new file mode 100644 index 0000000..d0d8ca5 --- /dev/null +++ b/src/pages/api/language/jp.astro @@ -0,0 +1,12 @@ +--- +import { changeLanguage } from "i18next"; + +changeLanguage("jp"); + +Astro.cookies.set("Language", "JP", { + path: "/", + sameSite: 'strict' +}); +return Astro.redirect("/"); +--- + \ No newline at end of file