Skip to content
Discussion options

You must be logged in to vote

That's an interesting use case! But yes, that looks really solid to me what you're describing.

Basically, next-intl allows you to define all of these independently:

  1. Locales your routing supports (can be dynamic)
  2. Locales your UI supports (can be dynamic, but subject to available messages)
  3. Locales your CMS supports (can be dynamic)

In your case, 1 and 3 are the same though.

How does this dynamic-locale-list approach affect static generation for pages?

You can return all, some or none (i.e. []) locales from generateStaticParams for static rendering. If (1) can change at runtime, you might want to be prepared to render an unexpected locale though (e.g. don't use dynamicParams = false). Bu…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jaqubowsky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants