-
Beta Was this translation helpful? Give feedback.
Answered by
zes00
Apr 2, 2024
Replies: 1 comment
-
Yeah, so, apparantly there's a difference between reading the docs and reading (and understanding) the docs. I was first setting 'common' namespace for my app-wide Navbar component on first render of index, then overriding it by setting 'pagecontent' namespace from getStaticProps on page/subroute level.. Fix: export async function getStaticProps({ locale }) {
return {
props: {
+ ...(await serverSideTranslations(locale, ['common','pagecontent',])), //either pass both namespaces on page level
+ ...(await serverSideTranslations(locale)), //or remove namespace array completely to pass ALL namespaces
},
}
} leaving this for anyone who might have the same issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
zes00
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah, so, apparantly there's a difference between reading the docs and reading (and understanding) the docs.
Issue was me not understanding how namespaces worked. (and probably not understanding how next.js renders content)
I was first setting 'common' namespace for my app-wide Navbar component on first render of index, then overriding it by setting 'pagecontent' namespace from getStaticProps on page/subroute level..
Fix: