New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n fallback in SSG mode does not generate pages #10957
Comments
I can see the bug, but your expectations isn't correct:
Also, your example isn't correct. Can you fix it? You created an |
Fair enough but a redirect also doesn't seem to be working. The docs do say:
But I guess what you're saying is the page is built but all it has in it is a redirect to the fallback? I guess a feature request would be to be able to configure that behavior (perhaps possible with What I don't understand then, is if I have translated pages for all my site, but a single page not translated, and a user gets redirected to another locale as a fallback. Won't Astro then set
Apologies, updated, I deleted the Thanks! |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
This may just be me misunderstanding how i18n fallback works in SSG mode, but when i18n fallback is configured, no fallback is created automatically.
With the example in the docs:
The docs say:
When testing this and going to
/fr
where there is no page/fr/index.astro
, it shows shows a 404.I asked kapa.ai in the discord and it seemed to agree it should be created without needing to set up dynamic routes for locale along with
getStaticPaths()
.What's the expected result?
Loading
localhost/fr
should render the/pages/index.astro
file withcurrentLocale
set tofr
(even when no/pages/fr/index.astro
exists).Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-qffjm2
Participation
The text was updated successfully, but these errors were encountered: