--- import LanguageSwitcher from '../components/LanguageSwitcher.astro'; import { useT } from '../i18n/translations'; import type { Lang } from '../i18n/translations'; interface Props { title?: string; description?: string; lang?: Lang; } const { lang = 'en' } = Astro.props; const T = useT(lang); const { title = T.defaultTitle, description = T.defaultDesc, } = Astro.props; const currentPath = Astro.url.pathname; const alternatePath = lang === 'ru' ? (currentPath.replace(/^\/ru/, '') || '/') : ('/ru' + currentPath); --- {title}