SSG (HTML export) + i18n (necessary trailing slashes on dynamic routes?) #17128
Unanswered
soykje
asked this question in
Show and tell
Replies: 0 comments
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.
-
Hello everyone! 👋
I've been working on my website, to make it support multilingual content. In order to achieve this goal, I used (like a few others...) the React Context API, and then implementing my
LocaleProvider
in my_app.js
:My pages folder structures also looks like this:
You can check the complete work here.
My last point of interest was on static HTML export: every pages were rendered correctly, but I noticed a few problems:
My first thought was my recent upgrade to NextJS 9.5 (with the famous
trailingSlash
feature), but even after downgrading the problem was still here... And finally, it seems that declaring thetrailingSlash: true
solved my problem!Everything works fine now (thanks to the dev/next community...), but I stay with that question: why do I have to use this option to make my website working? Am I constraint to use trailing slashes on static exports using dynamic routes (
[lang]
,[slug]
)?I'll be very happy to discuss with you, in order to understand the reason of this trailing slash necessity (how did other devs do before Next 9.5??) 🙂
Beta Was this translation helpful? Give feedback.
All reactions