-
Notifications
You must be signed in to change notification settings - Fork 116
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 is not working with domains #2345
Comments
Hi @SebastianSchenk 👋 Thanks for raising this issue. I don't see that you're using any Amplify packages in your project. Are you using Amplify for the |
Hey @chrisbonifacio! The project was set up according to these instructions. So amplify hosting ist used, but not through the Amplify CLI. |
Oh okay, I just took a look at the Next.js documentation and see that you're trying to use the i18n routing feature. This would have more to do with hosting and the way redirects are configured on the console than the JS library. I'll transfer this issue over to the console repo for better support. |
Hi 👋, thanks for opening! While we look into this... If this issue is related to custom domains, be sure to check the custom domains troubleshooting guide to see if that helps. Also, there is a more general troubleshooting FAQ that may be helpful for other questions. Lastly, please make sure you've specified the |
@SebastianSchenk |
@dqunbp thanks for verifying with Vercel! |
@SebastianSchenk any updates? |
No, nothing new here. I ended up not using the i18n domain feature and instead, changed the default language based on the brunch in CI/CD. This means I have one prod branch for each language. This workaround is quite tedious, but it helped me passing by this problem. |
@SebastianSchenk @chrisbonifacio |
@chrisbonifacio, Wondering if there have been any updates to this issue. I am running into the same problem when hosting with Amplify and using Next.js' i18n functionality for locale switching between domains. I tested the functionality on Vercel, where it works as intended but not on Amplify it is serving the wrong locale. |
Hi @glenhayes we're looking deeper into this issue. Thank you for your patience. |
Is there any update on this? I would love to use AWS Amplify to host nextjs, but I can't make the switch without support for domain based routing 😅 |
Hey @hloriana, @chrisbonifacio any news here? Some other folks have been waiting for domain routing to work for a while now: Am I missing something here? I'm reproducing the same bug in app d1jx07rvivs0st us-east-1 |
Actually it is not the first time they add an unsupported feature into supported feature here 😄 Also that is related to auto locale detection. I want to know is this issue is exist for you guys ? because I couldn't setup domain routing. |
It is a good workaround. as we have a amplify app for each domain I added default lcoale in env variable and use that directly in |
Does anyone have a workaround for this issue? |
This feature has just been supported with our latest launch! I'm closing this issue as it's been resolved. Check out the details here: https://aws.amazon.com/blogs/mobile/cdn-caching-improvements-for-better-app-performance-with-aws-amplify-hosting/ |
This issue is now closed. Comments on closed issues are hard for our team to see. |
This issue has been automatically locked. |
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
Not applicable
Amplify Categories
hosting
Environment information
Describe the bug
When using domain based i18n in Nextjs, the hosted version always returns the global default language regardless of the configuration specified for a domain.
It works locally, so I assume it has something todo with the lambda edge functions that are being deployed alongside the files for SSR support.
Expected behavior
Deliver correct defaultLanguage according to
next.config.js
configuration based on the domain.Reproduction steps
Deploy an nextjs app with domain specific i18n configuration.
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: