Handling Unsupported Languages #1052
Unanswered
JulienCertain
asked this question in
Q&A
Replies: 1 comment 1 reply
-
If you use I'll move this to a discussion since this is a usage question. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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.
Beta Was this translation helpful? Give feedback.
All reactions