Best Practices for Sitecore Internationalization

April 11, 2017 Juan Fausd

The Sitecore CMS provides useful features to create and manage websites targeted to global markets. Even though Sitecore provides a straightforward way for handling localized content, designing a multilingual website in a way that is extensible and maintainable can be challenging. In this blog, I am going to cover some of the best practices for creating an internationalized Sitecore website.

Content Structure

The content structure hierarchy needs to be carefully thought out, as this not only impacts the performance, but also the extensibility and maintainability. There are multiple approaches for structuring your content.

One of the aspects you should consider is how much the content could vary from one locale to another. In some cases, the entire website is the same and you just want to display the content in a different language with some minor differences. If that’s the case, you could just consider following the approach of keeping the content in the traditional structure and maintaining different language versions for each content item.

In other cases, you may want to display a very different website for a specific locale, with its own images and specific sections. If that’s the case, you could think about a structure with a Global node under Content, which will contain your default website for multiple locales and then, at the same level, a new node for each specific locale that needs to be considered separately, for example, Spain or Argentina.

  • Content

    • Global

      • Home

    • Argentina

      • Home

Media Library Structure

A media library is also very important to keep organized, especially when you are going to keep files with different versions for each locale.

If you want to separate media files based on different countries, you could follow a similar approach as mentioned previously for content. You could have something like the following:

  • Media Library

    • Global

      • Images

      • Videos

    • Argentina

      • Images

      • Videos

Also, you may not want to separate media by country, but by language.

  • Media Library

    • Global

      • Images

      • Videos

    • ES

      • Images

      • Videos

You could also follow a mixed approach, where you can put specific content for a certain country and language.

Additionally, you could restrict or disable media uploads directly under some specific levels, like the country name node, the language name node or the media root node.

Localized PDFs

As we mentioned initially, Sitecore makes it simple to create multiple language versions of a content item, but it’s not so simple when trying to do the same with PDFs. By default, Sitecore creates PDF items using the unversioned PDF template, meaning that the uploaded media file is shared across all languages. There are different ways to get around this.

The simplest method is to encourage content authors to use the Upload files (Advanced) option when uploading files. By selecting the checkbox with the option “make uploaded media items versionable”, it will create the media items using the versioned PDF template, allowing authors to then upload media files per language version of the media item. In order to do this:

  • Go to Media Library (in the content tree).

  • Select the folder where you want to upload the file.

  • Select the Folder tab.

  • Click on Upload files (Advanced).

  • Select the file you want to upload.

  • Check the item Make uploaded media items versionable.

  • Click on the upload button.

The previous method is simple, but it depends on authors to know or remember that step. There is an additional way to enforce all uploaded PDFs use the versioned PDF template. To do this, you could add a custom processor to the uiUpload pipeline that runs after Sitecore’s save processor. Then, in the processor you could add some code to detect if the PDF was uploaded using the unversioned PDF template and switch it to the versioned PDF template. For a further reference about how to perform this, go to the following link and check the title “Extend the uiUpload Pipeline”.

Templates

When selecting a template for your website, it’s important to keep in mind that not all templates work equally well with global websites. Text translated into a specific language doesn’t necessarily have the same length as the text in the source language. Using a template that doesn’t adapt to different text lengths could cause the text to be displayed incorrectly, with some overflows or incomplete sentences. Additionally, there are some languages that follow some specific rules, for example, Arabic, which is displayed from right to left.

As a result selecting a template that isn’t built with these kind of details in mind, can introduce a number of issues when introducing translated content into our website.

Dictionary

The dictionary is a feature of Sitecore that relies on a set of key/value pairs. One of the main benefits of putting content into the dictionary is that it can be reused in different areas by simply referencing the entry by its key. A benefit of the centralized storage, is that the translation only needs to be performed once and then it’s replicated in all the places that use it.

Summary

During this article, we explained some of the best practices to consider while working on Sitecore-based projects that need to go global. Of course, this list of practices isn’t exhaustive and, as you get more experience with the CMS itself, you may find some other practices for global projects. Keep in mind that designing sites for global audiences is an evolving challenge.

Further GPI Resources on Connectors and Website Development

GPI offers custom  CMS Translation Connectors to a variety of web content management systems in order to streamline localization workflows and access to translation project information across your enterprise. 

You may also find some of the following articles and links useful:

Please feel free to contact GPI at info@globalizationpartners.com with any questions about our language and technology services. Also let us know if you have any interesting blog topics you would like us to cover in our future blogs. 

References:      

https://sitecorejohn.wordpress.com/2010/01/15/sitecore-best-practices-internationalization/

http://www.sitecore.net/en/community/best-practice-blogs.aspx

http://www.hugeinc.com/ideas/perspective/sitecore-internationalization

https://sitecorecreative.wordpress.com/2015/08/07/creating-localized-pdfs-in-the-sitecore-media-library/

About the Author

Juan Fausd

Juan Alejandro Fausd is a native Spanish speaker from La Paz, Entre Ríos, Argentina. He graduated from university with a degree in Information Systems Engineering. While a student, he was active in several open source interest groups and has conducted seminars on a range of topics including version control tools, object-relational mapping and coding. He has extensive experience with different technologies like C#, ASP.NET, JavaScript, PHP, Symfony2, NodeJS, Unity, WCF, SQL Server, MongoDB and Cassandra. When he is not working, he enjoys outdoor activities and spending time with family and friends. He also enjoys learning and reading about new technologies, mostly related to software development and software architecture.

More Content by Juan Fausd
Previous Article
Magento Imagine 2017 - A Rising eCommerce Player is Upon Us
Magento Imagine 2017 - A Rising eCommerce Player is Upon Us

It is appropriate that the Magento Imagine conference was held in early spring. I now have a new view of wh...

Next Article
Adobe Summit 2017: Getting Down To Experience Business!
Adobe Summit 2017: Getting Down To Experience Business!

With promises to experience the future of digital with three full days of labs, sessions and top notch even...

Ready to translate your documents, software or website?

Request a Quote!