You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently in the process of coding a landing page with i18n and a static export. However, I've encountered a problem. While I've successfully implemented support for German and English languages on my page, attempting to switch to an unsupported language via URL triggers an error on my website.
My question is: How can I effectively capture any attempt to switch to an unsupported language? I've experimented with various approaches including template , error file, global-error file, not found, 404 file, and 500 file but unfortunately, none of these solutions seem to be working as intended. Any insights or suggestions would be greatly appreciated!
Verifications
I've verified that the problem I'm experiencing isn't covered in the docs.
I've searched for similar, existing issues on GitHub and Stack Overflow.
Error: Page "/[locale]/page" is missing param "/fr" in "generateStaticParams()", which is required with "output: export" config.
This error happened while generating the page. Any console logs will be displayed in the terminal window.
The text was updated successfully, but these errors were encountered:
If you use output: 'export', you won't have a generated page for /fr. Depending on where/how you host your website, the user might receive a 404 error when requesting this pathname.
I'll move this to a discussion since this is a usage question.
Repository owner
locked and limited conversation to collaborators
May 6, 2024
Description
Hello everyone!
I'm currently in the process of coding a landing page with i18n and a static export. However, I've encountered a problem. While I've successfully implemented support for German and English languages on my page, attempting to switch to an unsupported language via URL triggers an error on my website.
My question is: How can I effectively capture any attempt to switch to an unsupported language? I've experimented with various approaches including template , error file, global-error file, not found, 404 file, and 500 file but unfortunately, none of these solutions seem to be working as intended. Any insights or suggestions would be greatly appreciated!
Verifications
Mandatory reproduction URL
https://github.com/JulienCertain/next-intl-mvp-slug-error
Reproduction description
Steps to reproduce:
Expected behaviour
Server Error
Error: Page "/[locale]/page" is missing param "/fr" in "generateStaticParams()", which is required with "output: export" config.
This error happened while generating the page. Any console logs will be displayed in the terminal window.
The text was updated successfully, but these errors were encountered: