How do you only load the namespace files for the domain you are currently on? #1225
Unanswered
rolandjlevy
asked this question in
Q&A
Replies: 1 comment 6 replies
-
I think you are looking for Domain Routing, this is part of Next.js routing part: I understand that it can be useful if you set each domain to have a different |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @aralroca
If I have 5 active domains, when
_app.js
loads the'*'
namespace files do the files from all locales get loaded when you visit each domain?For example, if someone visits the
.hu
domain I only want to load the namespace files from thehu
locale - not all of them. Is that the the case?If not, is there a way of detecting the domain at that point so I can only load the namespace files which only correspond to the domain you are currently on?
Here is the relevant part of my
i18n.js
file. When I logcurrentDomain
I get undefined because there is no window object at that point.Thanks!
Roland
Beta Was this translation helpful? Give feedback.
All reactions