Not able to load new namespace dynamically at client-side #2307
Unanswered
mikaelnguyenpg
asked this question in
Q&A
Replies: 1 comment
-
If you can't add it on server side: https://github.com/i18next/next-i18next?tab=readme-ov-file#5-declaring-locale-dependencies You need to load them like this: https://github.com/i18next/next-i18next?tab=readme-ov-file#client-side-loading-of-translations-via-http => https://github.com/i18next/i18next-http-backend/tree/master/example/next |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys, I did try the sample SSG of this library


My goal is to test whether can load a namespace dynamically at client-side
Hence I make new json file
test.json
in each lang of locales, and extract key-valuedescription
fromfooter.json
intotest.json
I think that, in theory, in component Footer, i use
const { t } = useTranslation(['footer', 'test'])
, it should be able to load the new namespacetest
fine and the text of keydescription
should be displayed, isn't it?but result is that not able to display
the code i use is this
Could anyone explain for me why? and how to fix?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions