Switch off prefixes for all locales in the client

adetbekov
3
adetbekov
commented a year ago

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.

1
DreaMinder
55
DreaMinder
commented a year ago

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

0
HapLifeMan
0
HapLifeMan
commented 7 months ago

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!

0
paulgv
4.6k
paulgv
commented 7 months ago

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

0
imShara
5
imShara
commented 6 months ago

Yep, if you make app with interface localization only, there is no need to prefix language in routes.
UPD. Pull request

0
adetbekov
3
adetbekov
commented 6 months ago

@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).

0
imShara
5
imShara
commented 6 months ago

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

0
Informations
Question β€’ Unresolved
#c45 - Created a year ago