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
Trying to build an international site with nextjs.
Requirements and SEO reasons force me to support 250 countries and 6 languages.
that is 1500 different locales in "en-GB" format.
nextjs will refuse to build with that amount of locales with the message: Error: Received 1500 i18n.locales items which exceeds the max of 100, please reduce the number of items to continue.
In all honesty, the site really only needs to build 6 locales for each supported language, the content doesn't change.
The country is only important meta since it is an e-commerce online shop.
Describe the solution you'd like
A setting that lets you only build each page for each language, not each country + lang.
(or some other solution?)
Describe alternatives you've considered
maybe it would be also ok to have the languages in the i18n config and have a dynamic prefix for the country for all URLs (global base URL?), I hear Uber and Apple do it this way (if that is possible in nextjs)
/en/gb/
another possible solution was to try to rewrite "en-GB" => "en"
trying to do this as a workarround, sadly causes issues with links on the site, these will redirect to "/en"
JohnDeved
changed the title
Support large amounts of locales for Internationalized Routing
Support only building language for Internationalized Routing
Aug 24, 2021
Describe the feature you'd like to request
Trying to build an international site with nextjs.
Requirements and SEO reasons force me to support 250 countries and 6 languages.
that is 1500 different locales in "en-GB" format.
nextjs will refuse to build with that amount of locales with the message:
Error: Received 1500 i18n.locales items which exceeds the max of 100, please reduce the number of items to continue.
In all honesty, the site really only needs to build 6 locales for each supported language, the content doesn't change.
The country is only important meta since it is an e-commerce online shop.
Describe the solution you'd like
A setting that lets you only build each page for each language, not each country + lang.
(or some other solution?)
Describe alternatives you've considered
maybe it would be also ok to have the languages in the i18n config and have a dynamic prefix for the country for all URLs (global base URL?), I hear Uber and Apple do it this way (if that is possible in nextjs)
/en/gb/
another possible solution was to try to rewrite "en-GB" => "en"
trying to do this as a workarround, sadly causes issues with links on the site, these will redirect to "/en"
The text was updated successfully, but these errors were encountered: