Like multi-site is an out of the box(OOTB) feature, multi-lingual is also one of it. This is very handy when you have to create a site in different languages. Also you can set up multi lingual site with minimal efforts.
Let’s see a demo; we will add Spanish as an additional language.
- Go to Sitecore >> Content Editor.
- Navigate to Languages (/sitecore/system/Languages)
- Right Click >> Insert >> Language.
- Click on the drop down and select Spanish from Spain language.
- Click Next >> Next >>Next >> Close.
- Publish this language.
- Navigate to the Home item (/sitecore/content/Home)
- Click on Language version button >> Click on Spanish option language.
- Click on Add new version.
- Enter the data in Title and Text field.
- Publish the Home item. Remember to check if the Spanish checkbox is checked.
- Once the publish operation is completed.
- Browse your local instance, in my case http://sitecoredemo.sc/
- Now to browse Spanish site, browse http://sitecoredemo.sc/es-ES
Our multi-lingual setup is done, it is very simple and with no code involved. There are couple of things we need to understand are how the language read by Sitecore to change the content.
- Sitecore looks for language query string (?sc_lang=en)
- Language embedded in the URL (http://sitecoredemo.sc/es-ES)
- If both the above are missing then it checks for Language cookie managed by Sitecore for the context language.
Recommended and SEO friendly is the second approach to embed the language in the URL. We need to design the language selector module that can be part of Header which will give your end users an idea that the website is multi lingual and they can access the site in whichever language they wish to.
Thank you.. Keep Learning.. Keep Sitecoring.. 🙂