Using Drupal for Multilingual Websites: Configuration and Best Practices

Using Drupal for Multilingual Websites: Configuration and Best Practices

07 مارس 2024

In today's globalized digital space, multilingualism plays a huge role. Information resources are often popular among representatives of different nations and language groups. These people may have different beliefs and be followers of other religions, but they all have access to information on the Internet. Modern developers must always take the issue of universal access responsibly. The more versatile their site is, the more people they can reach the math, numbers, and facts. For example, 55% of pages on the Internet are in English, but only 19% of users are English-speaking.

Understanding Multilingual Requirements

Multilingual supported by CMS Drupal from the beginning and is constantly being developed. It is incredibly convenient that translations are stored in one place, on the official server, and updated regularly. The number of supported languages is also constantly growing (now more than 100). This is very convenient because you don’t have to translate manually every title and page. In general, the translation will be carried out automatically. However, there are some subtleties here. For example, translating content and translating the user interface are two different things. Below, the Golems web development company will talk about this in more detail.

Multilingual website disadvantages

If your website is made in only one language, then representatives of other language groups will not be able to gain any information, will not create traffic for you, and will not become your clients. Translating a website into other languages automatically increases the amount of traffic and customer base; this is a natural process.

Drupal Multilingual Features Overview

All text on the Drupal site is divided into certain blocks and categories. Each of them must be translated into another language. If a person translates the text, it takes a lot of time, but Drupal can do it automatically. However, you need to install modules for text translation and select the translation language. Also, you will need to add a language switcher to the site so the user can choose. Let's take a closer look at this process using specific examples.

Multilingual features in Drupal - adjustments

Well, first, you need to have four modules: 

After you have activated the modules, in the admin menu, click “configuration,” then “regional and language standards” / “languages”. After clicking, add a language. Once you have chosen to add a language, you will be presented with a menu with a selection of available languages. Once the translation is uploaded, you will receive a confirmation message and return to the languages page. Congratulations! You have added a new language to your site, as you can see - nothing complicated.

Don't forget to update your translations!

This is also relatively easy to do - Drupal will do all the work for you. You need to click on the right side of the "edit" button, after which you will see a list. This list has only two options - "translate" and "delete." We don't need to delete anything, we need to translate. When you click the "translate" button, Drupal will automatically download an updated translation version for the language you select.
Now, you need to add a translation for the content on the site, a translation for the configuration text, and a translation for the user interface.
Remember? We have just downloaded four modules. Let's briefly look at the basic concepts:

  • Text content. This is the text of the comments, user menu links, and other elements.
  • Configuration text. For example, this is the text that the developer sees. This is the text of your site's automated messages, field labels, view names, etc.
  • User interface. This text is initially present in the interface of themes, modules, headings, forms, and other elements. The user of your site usually needs to see this type of text.
  • Language module. It includes more than 100 languages, and the list is growing. This is where you select the language to add to the site.

Language switcher

We also need to add a language switcher to the site. There are two main conditions for this. First of all, you have to. You must first set the "hours and location" block. Additionally, the main theme must be set to "Olivero" before adding a switch. Now, you can proceed to install the switch. You can do it like this:

  1. So, you have the "Olivero" theme installed (the theme should be open in an additional tab).
  2. Next, select - admin/structure/block. You will see a list of available theme regions on the "block layout" page. 
  3. Okay, let's move on. We need to find the region sidebar in the list. Nearby, we see the value "place block" - click it. 
  4. After this, the "place block" window will appear in front of us, where all the available blocks will be. 
  5. Next, you must click the "place block" next to the "opening hours and location" block. 
  6. After this, you will see a "configure block" window with fields that must be filled out correctly.

In the admin panel, we need to go to:

configuration/regional and language/content language and translation

and select the types of objects for which translation will be available.

Text translation

All the steps we performed earlier were preparation. Now, we can move on to translating the content on the site. After you have installed the modules and made the necessary settings we discussed in the article, you will have an additional “translate” tab when editing the page.
A list of languages that you have downloaded will be available in the “translate” tab. Please note that the language is displayed because you downloaded it earlier, but has not yet been added to the page. To do this, click the “add” next to the “language”.
Once you have added a language, the translation will occur. All content types that you previously selected will be translated. Translation is carried out according to the basic concepts we have already discussed in the article. Therefore, you can see changes in the interface. Now, all you have to do is add the translated content to the fields. The last step is to click on the “save” button.

Best Drupal Practices for Multilingual SEO

The issue of SEO is crucial for website promotion. The growth of visitors directly depends on this. Here are some valuable tips:

  • Translating the text on the page and the text that may appear in the pictures is necessary.
  • Optimize your video. You can add subtitles in different languages if you have videos on your site. For example, you can add subtitles to a YouTube video posted on your website.
  • For some cultures and peoples, some types of pictures may be offensive; please be aware of this. For example, for a resident of India, the image of a swastika is a sacred symbol. Still, for residents of Germany, the image of a swastika has a completely different meaning.
  • Study your target audience and traffic statistics. Determine the language groups. This directly determines which languages you need to add to the site.
  • Don't forget about keywords. After the Drupal module does the translation, make sure that the content contains the correct keywords in the appropriate language. Sometimes, this has to be done manually with the help of online translators, AI, or even hired specialists.
  • Remember, customer support is no exception. At least you can add some of the most used regional languages to the FAQ page. 
  • Artificial intelligence. In order to add online customer support in other languages through a chatbot, many modern developers are actively using artificial intelligence.

How to prevent pages from sticking together? - URL & “hreflang” tags

“Hreflang” tags are used to ensure that pages with the same content do not get mixed up with each other. Also, you can specify not only the language version of the page but also the region for which this version is intended. There are a few simple rules for this:

  • kk - language
  • LL - region
  • URL - the correct URL of the alternative page

“Hreflang” is used together with the “alternate” tag, for example:

<link rel=”alternate” hreflang="kk-LL" href="URL" />

The use of special tags is a requirement of search engines, but there is no complete guarantee of protection against “gluing”. When adding this tag, you need to remember about page linking. On the English version, you indicate the German version, and on the German version, you indicate the English version.

More Drupal multilingual modules

In addition to the four basic modules that we talked about in our article, there are others. Here are a few modules that can help you make your website multilingual.

Words Online Connector
Allows you to send content for translation directly from the site to the WordsOnline translation service. You will not need to leave your workspace. For this module to work, you need to install the TMGMT module.

Language-Country Negotiation
A small module that performs an important function - it eliminates the need to register a region for each country. The module will do this independently—a precious solution when the site has many pages.

Open AI Translation Toolbox
It will help you translate website pages quickly and efficiently using artificial intelligence. It is a very convenient solution when you need to translate a large amount of text in a short time.

We have highlighted just several modules from the list of others. For complex projects with a large number of pages and a large audience, additional modules can be a huge help.

Conclusion or How do I make my Drupal site multilingual?

Drupal makes it possible to create a multilingual website and significantly expand your audience. A multilingual Drupal site is easy to maintain and update. Methods for promoting and translating pages are constantly evolving, which makes the owner's life easier. Plus, the international multilingualism in Drupal allows you to distribute your working time and achieve better results more effectively. Let`s make your Drupal site multilingual!

Comments

An
مجهول