Sitecore supports multi-lingual capabilities out of the box with the ability to easily set-up, manage, and render content in different languages.
I will not discuss the technicality of how to set-up a multi-language site, instead this post will be focused on the tips & tricks for things we found useful in our numerous implementations.
As a general rule of thumb, plan ahead and define with the business stakeholders the architecture and rules such as tree structure, custom languages & regions, and language fallback.
In this article I will list some advice and tips about common situations and features we have implemented for our clients.
Tips & How To
Adding custom language
In several cases you will need to add custom languages that are not defined in the OS or in Sitecore. For example, you may need to add a region (ex: EN-EU) and fallback other languages to this custom language. I found Freddie’s article very helpful and it covers the topic well:
http://sitecore-field-experiences.blogspot.com/2018/11/sitecore-custom-language-registration.html
Filter Content Editor by Current Language
One feature I found to be very handy for the author is filtering the Content tree based on the selected language. You can do this by extending “Sitecore.Shell.Applications.ContentManager.ContentEditorForm”.
Enable Sort Language
When you have a long list of languages, consider enabling a sort language in the content editor and in the forms. Authors will love it and it is very easy to implement!
Content Editor
<!-- CONTENT EDITOR SORT LANGUAGES Indicates whether the Content Editor show languages in the language selection dropdown in the same order as /sitecore/system/Languages child items. Default value: false -->
<setting name="ContentEditor.SortLanguages" value="true" />
Forms
To help extend Sitecore’s OOTB Form module, please refer to this article which we have found very helpful:
https://blog.fyhn.io/post/2019/02/24/sort-languages-in-sitecore-9-forms-builder-language-dropdown
Having a copy Language Script
This is a handy PowerShell script that enables the authors to copy any items and its descendants from one language to another. When you add a new language for an item, it doesn’t carry over data from another language; this script provides a quick way for authors to start with an existing language’s data.
Language & SEO consideration (Hreflang & Canonicals)
This topic can be one of the most important from the business and marketing prospective as doing it incorrectly can damage a site’s search engine ranking and might lead to being penalized for duplicate content.
Language is a highly relevant signal to search engines about how and where to rank content, the site should utilize the proper tags (rel=”alternative”) to serve up the appropriate language / translated content based on the selected location and language by the user.
Quite often search engines have difficulty differentiating similar languages (US English vs UK English) which can result in duplicate content problems and potentially lead to being penalized. To prevent this, you will need to ensure that the same or similar content served on different URLs in the same language utilizes the proper canonical tagging to show search engines which content is preferred.
Hreflang alternate tags are used to identify all language variants of each page on a site. These tags are placed in an array in the <head> section and list out each variant of a given page, including the page itself.
This can be tedious for the author to maintain manually so it should be handled in code.
Sitemap Generator
Similar to Hreflang & Canonicals, having an up-to-date, well formatted sitemap is essential for any successful SEO strategy.
We use an Extended Sitemap engine originally based on the Sitecore market place sitemap module. It automatically generates the sitemap.xml & robots.txt, virtually, for each country, and maintain its content for each language separately.
The author should have the option to include/exclude specific templates and items in the generated Sitemap.xml
At the item level the author should also have the flexibility to exclude it or to set-up the frequency and the priority.
One last thing
After adding a new language, it would be a good idea to review the schema.xml to double check the dynamicField mapping. Otherwise, Solr will not operate correctly for that specific language.
I hope you found these tips about features we have implemented for our clients helpful!