SF 4.1 Multilingual URLs
Hi,
We have three existing SF 3.7 websites, each site is available in german (default culture) and english. We use the persistenceMode "PathPrefix" and so our URLs are looking like this:
http://domain.com/de/contact
http://domain.com/de/imprint
:
http://domain.com/en/contact
http://domain.com/en/imprint
In SF4.1 we've added the same languages using the basic settings in the adminstration section. Again, german is the default language and under "Multilingual URLs" we've selected "Directories". But now SF 4.1 omits the language prefix for all default language pages and so we get navigation/sitemap URLs like this:
http://domain.com/kontakt
http://domain.com/impressum
:
http://domain.com/en/contact
http://domain.com/en/imprint
How can we force SF 4.1 to get also a "directory" prefix for default language pages WITHOUT the "trick" of simply adding a third (dummy/unused) language to the project?
Thanks,Hi Mathias,
The behaviour for the default language is the following - for your pages:
http://domain.com/de/contact
http://domain.com/de/imprint
If German is the default language
this page http://domain.com/contact can is also accessible like
http://domain.com/de/contact
You could skip the directory prefix and it will still open the default language. If you add it it will open it too.
The reason for this implementation is mainly because of SEO - shorter urls are better.
Regarding adding the directory prefix for the default language it is not supported out of the box at the moment.
Greetings,
Pavel
the Telerik team
Hello Pavel,
thank you for your feedback.
That's unfortunately the answer I've expected.
We use some 3rd party components on our SF 3.7 websites and their behaviour depends on that language/directory prefix. We can't change that.
Your current "SEO-friendly" implementation may make sense for completely new websites. But especially from a SEO point of view, it doesn't make sense for already indexed websites like ours. We've already figured out, that we can get the same resource with and without a leading /de/ (if German is the default language). If necessary this is fine to keep links intact. But due to the fact that the old links (with prefix) are still valid (no 404 or 301 returned) and the new navigation/sitemap/links omits this prefix, from the search engine's point of view, you'll end up with A LOT of duplicate content. And this is something we want to avoid.
As mentioned in my first post, as a workaround we use a third language as default. We decided to use Vietnamese, because the Shortcut "VI" appears on the right side of the translations column (Pages overview) which is less disturbing. However, this is in itself a really ugly "solution" and leads to other problems. In the IIS error pages section, we've set up a sitefinity page (\404) to show a user friendly message. And guess what happens in case of a 404? You're right, instead of the DE or EN localization, the default one is shown. And this is VI of course. Oh dear, this is completely nuts!
However, are there any plans at Telerik to optionally provide a directory prefix for the default language?
Thanks,
Mathias
Hello Mathias,
We can set it as a feature request and I hope that we can implement it for the next release -exposing a property to to put a prefix for the default language. Is it going to work for you?
Best wishes,
Pavel
the Telerik team
Hi Pavel,
thanks for your feedback.
An option as described would absolutely fit our needs. I hope this can be realized soon.
Thanks again,
Mathias
Hi Pavel,
>>...exposing a property to put a prefix for the default language.
are there any news on this option?
Thanks,
Mathias
Hi Mathias,
Yes, there is a setting - Go to administration -> advanced settings ->
Resources ->UrlLocalizationStrategies->SubfolderUrlLocalizationStrategy->StrategyCultureSettings
There you can edit the "setting" for each culture, please do not modify the "CultureKey". The "setting" property is the prefix that is used.
Kind regards,
Pavel
the Telerik team
Hi Pavel,
thanks for your reply, but this "setting" property still doesn't work for the default language (please see my previous posts).
I've tested this with SF 4.1 SP3 with German as default language and French/English as additional languages. In Menus, Links and Sitemaps there are still no leading /de/ in the URLs.
Kind regards,
Mathias
Hello Mathias,
At the moment this configuration works with cultures other than the default. I have logged this in our product backlog and we are going to implement it. You can follow the status of the backlog item here.
Regards,
Radoslav Georgiev
the Telerik team