How to set-up a multi-lingual website in Umbraco
While everything around us is rapidly getting automated these days, corporations across the globe have realized that it’s best not to employ automatic translations of business websites. Poorly translated websites using mechanical methods could lead to incorrect delivery of the message to the end users, leading to more confusion and sometimes cause irreversible damage to the company. Therefore, companies of all sizes are increasingly investing in setting up multi-lingual websites for their businesses.
A multi-lingual website not only helps businesses cater to user preferences but also reach out to a wider audience, globally. You can have the same website display pages in multiple languages without much of a hassle as most platforms provide multi-lingual functionality. We bring to you a step-by-step guide on how to set-up a multi-lingual website in Umbraco.
Umbraco supports multiple websites under same instance but it is not quite designed for handling 1-1 multilingual websites. However, we can set-up a multi-lingual website on Umbraco by following the steps as given below:
The first thing to do for creating multilingual websites is to create the languages. To create languages, login to Umbraco back-office, go to ‘Settings’ menu, right click on ‘Languages’ submenu and click on ‘Create’. Select your preferred language from the dropdown box, for example, select French (France) as shown in the screen shot below and click create button.
You can create any number of languages you want. And even though Umbraco does not support for 1-1 multilingual websites, there are ways to achieve this using Umbraco customization. We prefer to create separate website for each language under same instance of Umbraco for easy maintenance and to make easy customizations specific to that language. For example, you can create a different home page design for each language website.
While developing a multi-lingual site, we normally follow the process of creating the website in one language first and fixing all design issues. For creating multiple websites, you will either do so manually or duplicate the existing website. To duplicate the existing website, login to Umbraco back-office, go to content menu, right click on home node of existing website, select ‘copy’ option from the submenu and select Content node as shown in the screen shot below. Now click on Copy button.
After copying website, rename the home node. After that, publish home node and its subpages by right clicking on home node and select ‘Publish’ option as shown in screen shot below.
To set language for the website, right click on the home node and select ‘Culture and host names’ option from the submenu as shown in the screen shot below.
In the ‘Culture and Hostnames’ window, select the language for the website and add your domain as shown in the screen shot below.
Now update the webpages content. There may be a situation where some of the text is hardcoded in the view files or there are some standard strings to be shown on website, which are not part of actual page content. We can use ‘Dictionary’ feature of Umbraco for storing standard strings.
To create a Dictionary, login to Umbraco back-office, go to ‘Settings’ menu, select on ‘Dictionary’ submenu and click on ‘Create’ option as shown in screen shot below.
Enter Name for the dictionary field and click create. You will be redirected to a screen as shown below. Enter the actual string values specific to the language as shown in screen shot below.
Use these Dictionary items in the Razor view files using the GetDictionaryValue() Umbraco function as shown below.
Umbraco gives users the option to create multi-lingual websites without much coding. Thereby, people without any programming knowledge can easily use this feature to make their business website accessible to users with different language preferences.
In today’s competitive marketplace, to build a successful online business, you need to keep in mind the needs of your customers. It goes without saying then that language should never be a barrier between your business and your audience.
Umbraco’s multi-lingual functionality has helped many to set-up different language pages for their website, and you too can leverage this to expand your business. Contact us today to know more about Umbraco’s multi-lingual website feature.
Shwetha Bhat | Blogger
Manjunath Govindappa | ASP.NET Technical Lead