Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

How to Change the Default Language of a Drupal Site

Parent Feed: 
How to Change the Main Language of a Drupal site

One OSTraining member had set up a site in English and wanted to move everything over to their native language.

In this tutorial, I'll show you how to completely change the main language of a Drupal 7 site.

I'm going to use the example of an English-language site that needs to be changed to Spanish.

First, go to "Modules" and enable the Locale module:

Enable the Locale module in Drupal
  • Go to Configuration > Languages.
  • You'll see the main language which is currently enabled on the site.
Add a language to a Drupal site
  • Click the "Add language" link.
  • Choose your language from "Language name".
  • Click the "Add language" button.
Adding Spanish language to a Drupal site

You'll now see your Language has been added:

English and Spanish on a Drupal site
  • Check the "Default" button next to your new language.
  • Click "Save configuration".
Change the default language on a Drupal site
  • Go to https://localize.drupal.org to find a translation package to download. I want the Spanish version of Drupal 7 so I'll visit this URL.
  • Click to download the language file you need. I've highlighted the Drupal 7 download:
Downloading the translation files for a Drupal site
  • Back in your Drupal site, go to Configuration > Translate interface.
  • Click "Choose File" and import the file you just downloaded from Drupal.org.
  • Make sure to choose the correct "Import into" option:
Importing the translation files for a Drupal site
  • You will get a message saying that your import was successful:
A success message after importing a Drupal translation
  • Refresh your page and your entire site has been translated:
Your Drupal site, now in Spanish

About the author

Steve is the founder of OSTraining. Originally from the UK, he now lives in Sarasota in the USA. He was a teacher for many years before starting OSTraining. Steve wrote the best-selling Drupal and Joomla books.


Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web