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
My task is to create an application where there is a localization parameter, and there is also an additional parameters (example city). how to implement it with next-intl. I will be glad to any idea. I need to write a custom rewrite in middleware?
localhost:3000 - here active local is 'en' and city is 'all'
localhost:3000/en - city is 'all'
localhost:3000/en/all - here active local is 'en' and city is 'all'
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My task is to create an application where there is a localization parameter, and there is also an additional parameters (example city). how to implement it with next-intl. I will be glad to any idea. I need to write a custom rewrite in middleware?
locales: ['en', 'de']
default: 'en'
cities: ['all','city1', 'city2']
default: 'all'
localhost:3000 - here active local is 'en' and city is 'all'
localhost:3000/en - city is 'all'
localhost:3000/en/all - here active local is 'en' and city is 'all'
demo: https://codesandbox.io/p/devbox/confident-joliot-kh882g
Beta Was this translation helpful? Give feedback.
All reactions