--- import '@/styles/global.css' import { href, ROUTES } from '@/lib/routes' import { getI18n } from '@/i18n/utils' import { LOCALES, LOCALE_NAMES } from '@/i18n/config' import { setApiLocale } from '@/lib/api' import { i18n } from 'astro:config/client'; import { toCodes } from 'astro:i18n'; import LanguageDetector from '@/components/LanguageDetector.astro' const { title } = Astro.props as { title?: string } const siteTitle = title ? `${title} — Portfolio Studio` : "Portfolio Studio" const { locale, t, getRelativeLocaleUrl } = getI18n(Astro) // 把当前语言注入 API 请求层:所有服务端(SSG/SSR)取数统一带上 ?locale=, // 后端据此选 *_en / *_cn 列。客户端 fetch 则自行按 URL path 推断,无需此处。 setApiLocale(locale) // 经 data-* 属性把已翻译字符串传入打包型 {/* Top Footer Grid */}
{t('Minimalist editorial portfolio documenting haute couture shows, backstage fittings, and street culture. Integrated with 2026 color forecast intelligence and AI palette generator.')}
{/* Location Badge */}