How to create dynamic language-specific URLs using Display Name in Sitecore?

Share:
Display Name function controls the language-specific name that you give to an item in Sitecore. 
You can use Display name in two ways as following:

1. Rename item names with special characters.
When you create an item in Sitecore, you assign it an item name. Sitecore does not allow you to use special characters in the item name. This is because item names are used in URLs.
But using Display name you can rename item name with a special character. By default, the display name and the item name are identical. While creating a new item, the Display Name will be blank. 

You can set Display name either from Rename Section under the Home tab in the menu as shown in the screenshot below or from the Appearance tab.

Screenshot 1: Display name with a special character:-



2. Create a language-specific URL.

English (en) version URL:
http://sc902.local/en/post

French (fr-FR) Version URL:
http://sc902.local/fr-fr/publier

You can create language-specific URL using the display name as shown in screenshot 3 below:
After creating a display name you just need to visit the URL by inserting language in the URL before the item display name. Make sure you add URL friendly display name.
Screenshot 3: Set Display name:-


Screenshot 2: Language-specific URL:-

Soon I will add a video tutorial for this post, so keep in touch with https://www.codebrary.com/

References:
https://doc.sitecore.com/developers/81/sitecore-commerce/en/edit-a-catalog-display-name.html
https://doc.sitecore.com/users/93/sitecore-experience-platform/en/use-special-characters-in-an-item-or-page-name.html

Hi! I am Sartaj Husain. I am a Professional Software Developer, live in Delhi. I write blogs in my free time. I love to learn and share the knowledge with others because it is no good to try to stop knowledge from going forward. So free posts and tutorials. more..

No comments