diff options
| author | Joe Carstairs <jcarstairs@scottlogic.com> | 2023-08-04 19:04:54 +0100 |
|---|---|---|
| committer | Joe Carstairs <jcarstairs@scottlogic.com> | 2023-08-04 19:04:54 +0100 |
| commit | 62c23f65d3e838f05d0a71c00cadb29c92fb9e0f (patch) | |
| tree | 7fb8e04d66fed1c82fef3b043678e1142b25cfa8 /frontend/src/layouts/Layout.astro | |
| parent | 44ee01331fd7f7f8426b3771244692e263340a15 (diff) | |
Translates site title
Diffstat (limited to 'frontend/src/layouts/Layout.astro')
| -rw-r--r-- | frontend/src/layouts/Layout.astro | 11 |
1 files changed, 8 insertions, 3 deletions
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); --- <!DOCTYPE html> <html lang="sco"> <head> <meta charset="UTF-8" /> - <meta name="description" content="The wabsteid o the Scots Leid Associe" /> + <meta name="description" content={ t(site, 'description') } /> <meta name="viewport" content="width=device-width" /> <link rel="icon" href="/favicon.ico" /> <link rel="stylesheet" href="/public/normalize.css" /> <link rel="stylesheet" href="/public/main.css" /> <meta name="generator" content={Astro.generator} /> - <title>{title} | Scots Leid Associe</title> + <title>{ title } | { t(site, 'title') }</title> </head> <body> <slot /> |
