--- import Footer from '$components/Footer.astro'; import Navbar from '$components/Navbar/Navbar.astro'; import locales, { defaultLocale } from '$i18n/locales'; import translate from '$i18n/translate'; import tFeed from '$i18n/translations/pages/rss.xml'; import site from '$i18n/translations/site'; import { getLocaleFromPathOrDefault } from '$lib/getLocaleFromPath'; import type Locale from '$types/Locale'; interface Props { title: string; noBreadcrumbs?: boolean; } const { noBreadcrumbs, title } = Astro.props; const locale = getLocaleFromPathOrDefault(Astro.url.pathname); const t = translate(locale); function qualifiedLocalisedPath(newLocale: Locale) { const localePathSegment = new RegExp(`^/${locale}`); const localisedPath = Astro.url.pathname.replace(localePathSegment, newLocale); return Astro.site + localisedPath; } ---
{ locales.map((locale) => ( )) }