i18n getServerSideProps issue
Unanswered
Rufous-capped Warbler posted this in #help-forum
Rufous-capped WarblerOP
Hi, so I'm using getServerSideProps in every page file like this
My main trouble is, I fetch data with localizations, while I'm using this prop, they don't fetch again after language change, only locally stored translations works at this point, once I remove this from certain page, local translations stops working and my data fetches correctly on language change.
Is there any fix for this?
export const getServerSideProps = async ({ locale }) => ({
props: {
locale,
...(await serverSideTranslations(locale, ['common', 'homePage'])),
}
});My main trouble is, I fetch data with localizations, while I'm using this prop, they don't fetch again after language change, only locally stored translations works at this point, once I remove this from certain page, local translations stops working and my data fetches correctly on language change.
Is there any fix for this?