diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-17 08:17:11 +0100 |
|---|---|---|
| committer | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-08-17 08:17:11 +0100 |
| commit | 6fe126f03b92879dc5861eb53ee3d1ca0a25844d (patch) | |
| tree | e45bfc42b305314bd903fb113ee32819e94a2616 /src/components | |
| parent | 4f1f22aa70723fb77d22cc1237a1b85b1d3ae1bd (diff) | |
Switches language link language
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/SwitchLanguageLink.astro | 4 |
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}> |
