Why is __namespaces loaded in the page props when using getStaticProps #1236
-
Hi We have pretty big translations files (125kb) and I noticed that when I build my static home page, the entire json is included in the page props. Is there a reason for this? Thanks in advance next-translate: 1.6.0 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It should load only the JSON of the page namespace and with the language of the page. The JSON of the translations is loaded in build-time, but the translations are done in runtime, since they can dynamically change their values. We recommend that you define the namespaces properly, so that each page has a different namespace. |
Beta Was this translation helpful? Give feedback.
It should load only the JSON of the page namespace and with the language of the page. The JSON of the translations is loaded in build-time, but the translations are done in runtime, since they can dynamically change their values. We recommend that you define the namespaces properly, so that each page has a different namespace.