gatsby-plugin-react-i18next
gatsby-plugin-react-i18next copied to clipboard
language change Link not updating gatsby-plugin-layout component
Hello, I have been working through adding this plugin to our site and ran into an issue where using the language switcher. It lives inside my gatsby-plugin-layout component. and on Link click, it updates the url which changes all contents of the page, but does not update any of the translated text in the gatsby-plugin-layout component itself. the below example. the navigationHome translation does not update to the new language where all the t functions in the page itself do get updated. when refreshing the page, navigationHome does update.
Navigation.tsx
import { Link , useI18next, useTranslation } from "gatsby-plugin-react-i18next";
---
const { languages, originalPath } = useI18next();
const { t } = useTranslation("navigation");
---
<h1>
{t("navigationHome")}
</h1>
---
{languages.map((language) => {
return (
<Link key={language} to={originalPath} language={language}>
{language}
</Link>
);
})}


above are console logs when changing the language. the language changes form German => English and vice-versa but navigationHome does not update