This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

📣 Join our live AMA on the Future of Page Builders with Brizy's CEO! Register Now →

How to Setup a Multilingual Drupal Website

Updated on November 15, 2017

4 Min Read

While English remains the international language of commerce, the internet speaks a lot of languages. Thus, building your website only in English means that you are missing out a lot of opportunity for connecting with a broader audience.

setup multilingual drupal website

The good thing is that Drupal offers excellent multilingual capabilities, ensuring that your website is accessible to the widest possible audience. In this post, I’ll walk you through the process of setting up a multilingual Drupal site. At the end of this process, you will have a fully functional multilingual Drupal website.

Here are the steps involved in the process:

  • Modules checklist and activation
  • Add language
  • Add prefix language code
  • Download translation package
  • Import the language
  • Activate language switcher block
  • Enable multilingual support

Modules Checklist and Activation

The following modules are required throughout this setup:

  • Local (integrated with the core)
  • Content translation (integrated with the core)
  • Internationalization (Download and activate)
  • Variable (Download and activate)

Add Language

Navigate to the languages section in Admin > Config > Regional > Languages. Add a new language from here:

Add language

For the purpose of this tutorial, I will add Spanish:

Add Prefix Language Code

Now edit each language to add a prefix, e.g. ‘en’ for English and ‘es’ for Spanish. Note that it is usually preferable to leave the default prefix unchanged, otherwise, the existing nodes will cause issues because of changed links. In that case, export the nodes before assigning prefixes and then import them back again.

Navigate to the ‘Detection and Selection’ tab on the same window , and check the ‘URL’ option.

Download Translation Package

Access the following Drupal translation page and download the package for the language you added in the previous step.

Import Language Package

Now head over to admin > config > Regional > Translate and import the language package that you downloaded in the last step. You will also need to import packages for other modules and enable them in the same way.

Language Package

After the import completes, go to the overview tab where you can monitor the percentage of the website that has been translated.

Translate Interface

Activate Language Switcher Block

Now that the translations have been successfully downloaded and imported, I will next provide the users a way of switching between the two languages. For this purpose, I will add a block which will allow the users to do just that. Navigate to Admin > Structure > Block. Go through the list and find ‘Language Switcher’. Set it to a section of your choice and click Save Blocks at the end of the page.

Language switcher

Enable Multilingual Support

Next, I will enable the support of multi language for all content types. For the purpose of this tutorial, I will enable support for this post. Go to Admin > Structure > Types > Manage > Article. Click on ‘Publishing options’ and enable the radio button marked ‘Enabled, with translation’. Click Save when done. Do this for every content type that requires language translation.

Publishing option

Now, whenever you publish an article, you can select the display language. If you select ‘Language Neutral’, it will always be displayed in the language it was created.

Conclusion

That’s it! You’ve successfully setup multilingual support on your Drupal site. Note that, I have only covered interface translation in this post. For a complete translation of your website including menus etc, you will need to download more packages. I will cover that topic in another tutorial. I hope you found this post useful.

If you are looking to speed up your Drupal websites, I would suggest to see blog post by us on: Speed Up Drupal Websites With Google AMP.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Hamza Zia

Hamza is a Drupal Community Manager at Cloudways - A Managed Drupal Hosting Platform. He loves to write about Drupal and related topics. During his free time, he can be seen obsessing over Football, Cars, Android and Gaming.

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

CYBER WEEK SAVINGS

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

GET OFFER

For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now