Multilingual Url

Recently we had request from few of our client’s SEO agencies asking us whether we can have non-English (Unicode) characters for page urls?

Sitecore supports multilingual website by creating language version of a page. So for different languages the page name in the URL remains same. By default sitecore builds the url using Item name.

The requirement was to have language based page name in the page URL.

For e.g

http://mydomain/en/about-us
http://mydomain/de-de/über-uns
http://mydomain/es-es/quiénes-somos
http://mydomain/ja-jp/会社案内
http://mydomain//關於我們

On investigating with one of my colleague (Alok Kadudeshmukh) we found that Sitecore supports non-English characters in the URL.

We first thought changing the item name of the language version to non-English character, but in sitecore there is restriction on having such names. However you can change the settings in web.config file for allowing special characters in Item name.

The trick that worked for us was changing the DisplayName field value to have the non-English character and then tweaking web.config. Interesting? Read through the blog for exact details of the implementation.

Web.config

In web.config file we changed the value of attribute “useDisplayName” to true for configuration/sitecore/linkManager.

<add name=”sitecore” type=”Sitecore.Links.LinkProvider, Sitecore.Kernel” addAspxExtension=”false” alwaysIncludeServerUrl=”false” encodeNames=”true” languageEmbedding=”always” languageLocation=”filePath” shortenUrls=”true” useDisplayName=”true” />

Next for each of the item, we added non-English character page name that should appear in the URL, in the field Display name (“__Display name”) field which is available in Appearance section.

sitecore - appearance - section

Simple, it was, we had a happy SEO agency and client.

In my next blog I will be writing more about SEO urls and how they can be achieved with sitecore.

Leave a Reply

Your email address will not be published. Required fields are marked *