Can pathnames dictionary, locales and default locale be dynamic(using an api) in Next.js 14? #1104
-
Hey there. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Have you seen this section in the navigation strategy docs?
|
Beta Was this translation helpful? Give feedback.
-
Yes but there are still some uncertainties for me. i don't wanted to use catch-all routes for all of my routes. let me give you some examples. CMS will choose what the products, blogs and ... page names be in different langs. so If I'm not mistaken, I should follow something like this syntax : The values of about route is dynamic and i don't have any idea how to pass it through the createLocalizedPathnamesNavigation to use inside my components. I feel that I have been completely misunderstood :p |
Beta Was this translation helpful? Give feedback.
-
Appreciated mate. |
Beta Was this translation helpful? Give feedback.
Ok I see! So
createLocalizedPathnamesNavigation
is really intended to be run with static strings, with the main benefit being strict types across your code base (e.g. enabling autocomplete).So I think you have these options:
createLocalizedPathnamesNavigation
and define at least some segments there (easiest)