summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-17 08:17:11 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-17 08:17:11 +0100
commit6fe126f03b92879dc5861eb53ee3d1ca0a25844d (patch)
treee45bfc42b305314bd903fb113ee32819e94a2616 /src
parent4f1f22aa70723fb77d22cc1237a1b85b1d3ae1bd (diff)
Switches language link language
Diffstat (limited to 'src')
-rw-r--r--src/components/SwitchLanguageLink.astro4
1 files changed, 3 insertions, 1 deletions
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);
---
<a class="link switch-language-link" href={otherLocalePath}>