Articles


How to Create a Multilingual Drupal Site?

How to Create a Multilingual Drupal Site?



Posted by admin ,14th Oct 2024

A multilingual website set up in Drupal helps us get exposure to a global online marketplace and allows businesses to reach different cultural audiences by presenting content in multiple languages. In this blog, we will discuss the detailed process of configuring a multilingual site on Drupal.

Tips for Creating Multilingual Sites on Drupal

process of configuring a multilingual site on Drupal

While creating a multilingual Drupal Website, there are some key aspects to remember; here are some tips:

  • Version– Choosing a Drupal version that offers multilingual support. Drupal 8 and later versions provide built-in tools for multilingual support.
  • URL structure– You should decide how URLs are organised for different language versions. One can choose between one URL for each language version, like /en for English, /fr for French or can make use of a subdomain.
  • Content management– Always make sure all your website content is available in different languages; you can use automated content translation tools like Google Translate API or manually translate it.
  • Metatags and SEO– Optimise metatags for each language version to improve your website’s visibility.
  • Testing– Remember to test your website thoroughly and ensure everything works correctly in different language versions. Always pay special attention to possible changes in page layout due to differences in word and sentence length between languages to avoid incorrectly displayed content.

Advantages of Creating Multilingual Drupal Websites

There are a few reasons why Drupal is a perfect solution for multilingual websites:

Support for Multiple Languages– Drupal offers support for multi-language, so you don’t have to install translation modules or extensions. You can enable the multilingual feature and start adding new languages.

Translations—Drupal has a management system in place that allows for website content translation. This includes the user interface, content, and the administration panel.

Easy Switching—Drupal has an inbuilt language switcher that allows visitors to quickly switch between language versions. You can place it anywhere on the website.

SEO– Drupal allows SEO-friendly URLs for multilingual sites, and that can set separate URLs for each language version.

Scalability– Drupal supports flexible structure and even the largest and most complex multilingual website.

Adding New Language and Configuring Translations

This section will explain how to add new languages to your Drupal website and configure translations in the admin panel.

Translation Modules

Since version 8, Drupal has several built-in multilingual modules, including Language, Content, Configuration, and Interface translations. Language is essential for websites without English as the base language; content translation allows for content translation, Configuration translation translates admin panel configuration, and Interface translation handles user interface translation.

Adding New Language

Drupal has a management system in place that allows for website content translation

Go to Configuration -> Region and language -> Languages. You should see a list of previously installed languages.

Adding a new language to Drupal

Click Add Language to add a new language.

New language

Select a language from the list and click Add language. If it’s not on the list, you can add it manually by selecting Custom Language.

Adding a custom language

After clicking Add Custom Language, the translation starts downloading. Then, you will be redirected to the installed languages list, where you will see the message.

Language Switcher

Now head to Structure -> Block layout. Click Place block and search for a new language switcher block:

How to enable the language switcher

Website Elements Configuration

To translate page elements such as content types, taxonomy dictionaries, or user profiles, go to Configuration -> Region and language -> Content language and translation:

Website elements translation

In Custom language settings, choose which sections should have more language options. The settings for each section are below. In the Translatable section, check the box next to them.

Content Translation

Now that you have learned how to add a language and configure translations in Drupal, let’s move on to content translation.

Create New Content or Edit an Existing Page

Go to the Content tab, then choose the Translate option in the Operations section.

Translating the content

Interface translation handles user interface translation

Select a Language

After clicking Translate, you will see a list of all the languages. Notice that the Spanish language we added has not yet been translated. Now click Add to create the translation.

Select the language

Add Translated Content to the Appropriate Fields

In the last step, add translated content and save changes:

Add translated content

Configuration Translation

To translate the interface in the admin panel, head to Configuration -> Region and Language -> Configuration translation.

Translating the configuration

The list shows all the page configuration elements that can be translated. To translate a sample section, click the List button assigned to the section, and then select the element by clicking Translate.

List of blocks

Select the language you want to edit content, then click Save translation.

Edit the translation

SEO Optimization for Multilingual Sites

SEO Optimization for a multilingual Drupal website requires considering different factors affecting page visibility for other languages. Here are some key aspects to focus on.

URLs for Different Language Versions

Ensure your website’s URL structure is set up correctly for different language versions. Drupal offers URL configuration tools that allow you to create readable addresses for each language.

Meta Tags for Each Language

Correct meta tags, including meta title, description, and keywords for each language version, can enhance a website's visibility. For multilingual sites, the "hreflang" attribute is beneficial as it informs search engines about the website's different versions for specific languages, boosting SEO. It should be placed in the link section.

<link rel="alternate" hreflang="pl" href=”https://xyz.com/pl/” />

<link rel="alternate" hreflang="en" href=”https://xyz.com” />

Creating Sitemaps for Different Language Versions

Create separate sitemaps for each language version and register them in webmaster tools like Google Search Console. This will ensure easy indexing of all language versions.

Avoiding Content Duplication

Avoid duplicating content between different language versions, which can negatively impact your search engine rankings. Follow canonicity rules and keep your content unique in each language version.

Monitoring and Analyzing the Results

Use tools such as Google Analytics to monitor SEO results for different language versions regularly—Analyse data on organic traffic, conversion rates, and user behaviour to adjust your optimisation efforts.

Summary

Setting up a multilingual Drupal website can be challenging, but with the right resources and guidelines, it can be done quickly and effectively. Consulting with Drupal specialists can also be beneficial. The article covers the processes of building a multilingual Drupal website, including installation, language configuration, and content translation management. Adjust these guidelines to suit your specific website's objectives and standards.