-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Release 11.1 introduces i18n limits that blocks us from upgrading. #28157
Comments
This is a blocker for us as well and will force us to find a suitable alternative. We would also like to be able to define /change the locales at runtime instead of needing to be configured up-front. (for multi-tenancy purposes) |
Same problem |
Hi, is unique content being generated for all 177 locales or are there so many locales being configured to ensure they are routed correctly? Would ensuring the routing maps Note: for each locale configured an additional version of each page is generated (unless using |
Hi, thanks for the response. Yes is unique content. We have like 80+ languages where the site is translated to. However, each country has its own content in official local language and in English.. So, even if we have 30+ sites in English the content varies for each. Not sure if I understand your note, however what are you saying is that for each local a "copy" of the site is generated in the respective locale. Maybe is easier to see the use case: here is the index of all the sites generated https://www.volvocars.com/intl/legal One question is why the |
I see thanks for the details, the reason we put this limit in place was from potential performance impacts from having boundless locales configured. We also want to make sure users aren't accidentally creating extra locales by auto-generating them so having a limit in place is good. The performance impacts mentioned comes into play for a few places one is during build-time which is from generating a version of each page in so many locales which may not be a problem for smaller sites but in larger ones can slow things down a noticeable amount e.g. 20 pages with 175 locales needs to generate 3500 versions (potentially requiring data be fetched each time in We are looking into optimizing these items along with a few others to ensure the best performance. This limit is definitely flexible and we used the fact that Google translate has 108 languages as prior art for deciding on the initial limit. I converted this hard error for hitting the limit into a warning and also added documentation for the caveats of statically generating pages with i18n enabled here. |
for my case that would help, content would not be different across different countries. |
@ijjk ahhh I see. Much appreciated. Thanks for the quick fix. |
@ijjk trying to do this as a workarround, sadly causes issues with links on the site, these will still redirect to "/en" async rewrites() {
return {
beforeFiles: [
{
source: '/:lang(\\w{2})-:country(\\w{2})/:path*',
destination: '/:lang/:path*',
},
],
}
} |
@JohnDeved there isn't currently a workaround using rewrites to achieve the mentioned behavior it will need to be added in |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
10.2.3 -> 11.1
What version of Node.js are you using?
14.x, 16.x
What browser are you using?
Chrome, Firefox
What operating system are you using?
macOS
How are you deploying your application?
next build and we then deploy it in our own infra. (Docker and kubernetes)
Describe the Bug
Currently we are using version 10 of next js. After the summer we planned to upgrade to 11. Then with the release of 11.1 we decided to jump directly to latest. We have a site that has 177 locales and it has been working fine (even on version 11.0). However, 11.1 introduced hard limit to 100 without explanation or warning or a workaround.
Here is the commit of the documentation https://github.com/vercel/next.js/pull/27542/files
And docs in prod
https://nextjs.org/docs/advanced-features/i18n-routing#limits-for-the-i18n-config
Expected Behavior
We can upgrade without issues given that it worked before.
To Reproduce
Create a
next.config.js
file with 100 more than i18n locales and then runnext build
.The text was updated successfully, but these errors were encountered: