Replies: 2 comments 8 replies
-
Any update on this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Apparently when using domain-based routing the problem is even worse. It seems impossible to revalidate routes other than lose for default locale. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using both on-demand ISR and internationalized routing (with sub-paths) for https://figure.game/. On-demand ISR is how I deploy new daily puzzle data at midnight UTC every day, which works beautifully. The built-in i18n routing is working perfectly as well.
I just ran into a little gotcha when using both together: the localized versions of my routes weren't getting revalidated (so no new puzzle today for Spanish-speaking players). I think I've sorted it out, but wanted to get some feedback on my approach and also share this in case it's helpful for anyone else who runs into this issue.
From the documentation on i18n routing, I had assumed that
revalidate()
would updategetStaticProps
for all locales. I think this bit, which seems to only apply to the initial build, is where I made this false assumption:When I double-checked the on-demand ISR documentation, this comment in the example code clued me in:
I believe the solution is iterate over the i18n locales when revalidating paths:
Does this seem like the right approach, or is there a better way?
Beta Was this translation helpful? Give feedback.
All reactions