It would be nice to add toggle of removal locale codes in URLs exactly for the client. And automatically redirects to "clean" version of url in the client only.
Agree. For example if you use i18n for web-app, it would be nice to remove locale prefixes from URLs.
this might be useful. https://nuxt-community.github.io/nuxt-i18n/routing.html#module-s-configuration-2
Any plan to add this feature @paulgv? It could be very useful 🙂
Maybe a prefix: false, // or null or pages: false, would do the job!
prefix: false, // or null
@HapLifeMan this would certainly be an interesting feature!
Sadly, I simply don't have enough time to keep working on the module… I'm doing my best to check and merge the PRs but that's the most I can do right now.
If anyone wants to give it a shot, I'll be happy to follow any PR for this feature until it's merged.
Yep, if you make app with interface localization only, there is no need to prefix language in routes.
UPD. Pull request
@imShara I think it is necessary for Server Side Rendering part. Otherwise search engine bots will not be able to index multi-language sites. May be it should be neglected dynamically on the client side. Add some triggers, you know, some state, that remember current language(preferred locale).
@adetbekov E.g app is forum. Interface is multilangual, content - mixed. What should be in url? What should happens with locale when you send link to thread?