I18n-module: Switch off prefixes for all locales in the client

Created on 27 Mar 2018  路  8Comments  路  Source: nuxt-community/i18n-module

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.

This question is available on Nuxt.js community (#c45)
wontfix

Most helpful comment

Agree. For example if you use i18n for web-app, it would be nice to remove locale prefixes from URLs.

All 8 comments

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

screen shot 2018-08-11 at 20 30 44

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!

@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?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings