Replies: 1 comment
-
Just figured out I also need to return props in return {
props: {
...translation
}
} Now everything is working both in dev and production. |
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
-
If there is no default value it would display the key of the translation. Any idea what is going wrong in my code?
You can see I give the text a default value which is "my title".
In component:
In
getServersideProps
:in
i18n.ts
:In
next-i18next.config.js
:Because debug is turned on, I can see this message after I switch locale by appending "ja" like this
http://localhost:3000/ja
:and a bunch of other missingKey messages. But the key "home.title" is in
ja/home.json
. And I can see the changes if I update the value in the key. But that's just for half a second and then it goes back to the default language.I have no idea why would it give this warning. On the server side the translation is loaded to the
pageProps
.Why does it load it on client side and then revert back to the default value?
Beta Was this translation helpful? Give feedback.
All reactions