Translations not loading in on production with getServerSideProps and next-i18next #2159
Unanswered
thibaultferaux
asked this question in
Q&A
Replies: 1 comment
-
This seems to work: deployed to vercel: https://next.i18next.com/second-page |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In Next.js I am using the package
next-i18next
for my translations.All my translations are working fine and when I have a page with getServerSideProps it works on my local development server but when I push it to production with Vercel the translations on those pages are not working. On pages where I use getStaticProps it works.
FYI: I use the pages router in Next.js.
This is my getServerSideProps function:
This is how I call the translations in the component
I render a translation by:
<p>{ t('quote details') }</p>
Is there anyone who recognizes this problem and knows how to solve it?
I tried it on another component that was working with getStaticProps, and changed it to getServerSideProps. I wanted to know if it was a problem with the component or not but on the component that was working before it didn't work and just rendered the name of the labels from the translations :(.
Beta Was this translation helpful? Give feedback.
All reactions