From 62c23f65d3e838f05d0a71c00cadb29c92fb9e0f Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Fri, 4 Aug 2023 19:04:54 +0100 Subject: Translates site title --- frontend/src/layouts/Layout.astro | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'frontend/src/layouts') diff --git a/frontend/src/layouts/Layout.astro b/frontend/src/layouts/Layout.astro index 1a47613..b17de4d 100644 --- a/frontend/src/layouts/Layout.astro +++ b/frontend/src/layouts/Layout.astro @@ -1,24 +1,29 @@ --- import Footer from '../components/Footer.astro'; +import translate from '../i18n/translate'; +import site from '../i18n/translations/site'; +import type Locale from '../types/Locale'; interface Props { + locale: Locale; title: string; } -const { title } = Astro.props; +const { locale, title } = Astro.props; +const t = translate(locale); --- - + - {title} | Scots Leid Associe + { title } | { t(site, 'title') } -- cgit v1.2.3