--- import { alternatePath, type Locale, t } from "@app/i18n"; import HomeBody from "~/components/pages/HomeBody"; import AppLayout from "~/layouts/AppLayout.astro"; export interface Props { locale: Locale; } const { locale } = Astro.props; const otherLocale: Locale = locale === "zh-CN" ? "en" : "zh-CN"; const switchHref = alternatePath(Astro.url.pathname, otherLocale); ---