Weird alternate links #1676
-
Hi everyone. We have quite a lot of locales combinations (around 3k), but we don't want to list all of them as the alternate links. routing.ts:
request.ts
What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I think I figured it out right after posting. Since I was not including all the locales in the routing config to avoid polluting the thing with 3k options (and this was causing ERR_RESPONSE_HEADERS_TOO_BIG), the router was not considering some custom locales like The solution:
handleI18nRouting.ts:
|
Beta Was this translation helpful? Give feedback.
-
If you don't want to include a huge number of alternate links per page request, you can alternatively also consider to use a sitemap to link the pages. |
Beta Was this translation helpful? Give feedback.
I think I figured it out right after posting.
Since I was not including all the locales in the routing config to avoid polluting the thing with 3k options (and this was causing ERR_RESPONSE_HEADERS_TOO_BIG), the router was not considering some custom locales like
fi-US
a locale, but rather a pathname.The solution:
handleI18nRouting.ts: