From 6fe126f03b92879dc5861eb53ee3d1ca0a25844d Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Thu, 17 Aug 2023 08:17:11 +0100 Subject: Switches language link language --- src/components/SwitchLanguageLink.astro | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/components/SwitchLanguageLink.astro b/src/components/SwitchLanguageLink.astro index c8733bc..e7b04da 100644 --- a/src/components/SwitchLanguageLink.astro +++ b/src/components/SwitchLanguageLink.astro @@ -15,7 +15,9 @@ const otherLocalePath = currentPath .replace(currentLocaleInPath, `${otherLocale}/`) .replace(newsCurrentLocaleInPath, `${otherLocale.toLocaleLowerCase()}`); -const t = translate(currentLocale); +// The language link should be in the language it +// points to, not the language of the current page +const t = translate(otherLocale); --- -- cgit v1.2.3