--- import { getPublication } from '../utils/publication'; const publication = await getPublication(Astro.url.pathname); const pathname = publication.route; const langMeta: Record = { en: { short: 'EN', full: 'English' }, es: { short: 'ES', full: 'Español' }, ar: { short: 'ع', full: 'عربي' }, }; const choices = publication.translations.map(({ lang, route }) => ({ code: lang, href: route })); const activeCode = publication.entry.data.lang; const activeShort = langMeta[activeCode]?.short ?? 'EN'; ---