Building a multilingual website or taking your Drupal site into new languages? Check our website localization strategy tips before you start!
Subscribe to our blog
In a previous blog post I wrote about how building a multilingual website has vastly improved in Drupal 8. At first glance, you may think it’s easy: "just translate the site into x languages”, but once you start asking yourself the right questions, you may be surprised about the factors you need to consider and the issues that might come up. We suggest you take into consideration the following tips to manage a multilingual website in Drupal 8 before you start.
1. What can be translated on your site?
Understanding the basic Drupal 8 translation concepts will help you to design the right solution. Drupal provides three types of information that can be translated, and each type comes with its own method for translating.
- User interface text: This text is built-in and present in the core software. Examples include button labels, error messages on forms, status messages and help text.
- Configuration text: Text whose structure and initial values are defined by the software, but which can be edited. Examples include labels for fields in content types, the site name, and the content of automatic email messages that your site sends out.
- Content text and files: Content fields can contain textual information or uploaded files. Each field on each content type can be configured to be translatable (e.g. the page title, a pdf document) or non-translatable (e.g. the author’s name, decorative images containing text).
2. Don’t forget the translator
The default administration interface in Drupal does a nice job for editors to create and review content, but managing multilingual website content requires some special use cases. Consider building a customized interface for translators, where you can filter out not translated content or outdated translations and effectively visualize pending tasks.
3. Manual or automated translations?
For large websites with a global audience doing manual translations may be a daunting task. You may want to consider adding a native website translation tool where content managers can request and receive page translations directly on the Drupal CMS.
4. Keep tabs on your website’s primary language
Keep in mind that for a translator, localizing from English to German is a very different task than translating from French to German. You may want to implement guidelines that require authors to create content in the default site language first.
5. Reuse content
When you need to show the same content make sure to reuse it - this will avoid the need for translating the same item twice. Drupal's node system is ideal for this purpose. For example, text segments can be displayed in different ways allowing the same product description to appear as a related item or as a search result. Make sure you identify the different components that can be reused before you start building. Note: Be wary of content duplication as it might impact your website’s search engine ranking.
6. Internationalization and localization!
It may be sufficient to have your website fully translated into all the relevant languages, but chances are that it's not enough. Localizing your content to cater to your target audiences’ linguistic and cultural preferences proves much more effective. It will show your audience you understand cultural differences such as: not asking Flemish people to click on a Dutch flag or Mexicans or Catalans on the Spanish one, supporting right-to-left languages if needed (e.g. Arabic, Hebrew), and using local date notation and currency. Did you know that the quotation mark is different in a lot of languages? Drupal comes with a built-in internationalization system, so your site can be easily adapted for different locales.
7. In-site search considerations
For some organizations or products it might make sense to offer users the possibility to search throughout the different languages available in your website, but most probably you’ll want to restrict search results to the visitor's language. You should also consider if transliteration is important so your in-site search supports queries with or without accents. Another common pitfall lies in language stemming. The process of stemming reduces each word in the search index to its basic root or stem (e.g. 'fishing' to 'fish') so that variations on a word ('fisher', 'fished', 'fishing', ‘fish') are considered equivalent when searching. This generally results in more relevant search results. Although multilingual stemming is not a standard feature in Drupal, your digital partner can help you to integrate the necessary stemming algorithms to optimize visitor search experience in all languages.
8. Multilingual workflows
You can also set up workflows to keep your website content up-to-date in all languages. You can automate the review of translated content by setting up automatic assignments to your reviewers, but make sure that they take into consideration the reviewers’ language scope. I.e., when a reviewer doesn’t understand Chinese they should not be assigned content in that language.
By default, once content is sent for translation it can still be modified in Drupal. In this case, the translation will not be based on the changed content but on the original version prior to the modification by the editor. You may want to lock content from being modified by the editor once it is sent for translation, but you can also set up a workflow that automatically requests the translation for the updated content.
9. Respect language preferences
Make sure to detect the users' language from his browser or if it’s a registered user from his account preferences. Drupal 8 provides a language detection and selection mechanism that allows you to host your website on different domains or use a path prefix for different languages.
10. Follow multilingual SEO guidelines
Drupal 8 already provides a lot of SEO features to support most of Google's multi-regional and multilingual requirements such as the 'rel-alternate-hreflang' guideline to make sure that the correct language or regional URL is served to searchers. You’ll want to design a URL structure that makes it easy to geo-target parts of your site to different regions and make it easy for visitors to find their region if they accidently land on the wrong one. Another important aspect to keep in mind for SEO is the performance of your website. For example, you may want to consider a multi-region server to avoid latency when targeting audiences across oceans.
About the author
Maarten is Consultant at AMPLEXOR International based in Belgium. Maarten joined AMPLEXOR in 2012 and has over 15 years of experience in web development, specializing in Drupal. He is a Certified Scrum Master and Acquia Certified Developer.