#Slug before localization
5 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
Not sure what you are asking excatly.
A library like next-intl does wht you describe. Just the other way around, e.g: /locale/slug
That's the setup it requires to do other localization taks like rewriting slugs, language switching, middleware, alternate href headers and so on
We are using next-intl for that but the issue we have right now is that the client wants that [company] before the locale as that part will be dynamic. I’m not sure if it will be possible to create a static param that represents the slug. I was wondering if there is a way to put the slug before the localization
only via rewrites imo. You'd have to keep next-intl structure, so
[locale]
[company]
Disable Locale Prefixes all together
export default createMiddleware({
// ... other config
localePrefix: 'never'
});
And rewrite the paths in the middlware
But i dont know that sounds stupid writing it