A way to show or hide defaultLocale path #135
-
I need to show the defaultLocale path '/en/'. I have seen the other post that some requested to remove the defaultLocale from path for "better SEO" and that their request was done. This is certainly better in some cases, but not all cases are alike. Some other cases might need the locale paths to be shown for example if they want to switch the "default" language or have a site with path '/en/' that is already indexed. I tried to comment the replace function in hooks, but I didn't succeed. Can it please be optional? It would be much versatile then and will suit all cases. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @yazer79! |
Beta Was this translation helpful? Give feedback.
-
Hi @jarda-svoboda .. Yes, I tried it and it works better for my case. The example docs were not clear about what it is about. It would be easier to see something like "Use this example if you are trying to get local routing for all language paths: i.e 'example.com/en/about', 'example.com/de/about' There is also an important thing, the content links display the path only if used this way: |
Beta Was this translation helpful? Give feedback.
-
Oh, so maybe you just need to combine these two examples? locale-router and locale-router-advanced |
Beta Was this translation helpful? Give feedback.
Hi @yazer79!
Have you seen this example?
I think that’s what you are looking for.