Change Languages in Drupal Sites

drupal languages

This week, an OSTraining member had a question about translating Drupal sites.

They installed their site in English, but then wanted to change to a different language.

This is our answer for that member. This tutorial will walk you through the process of changing the language used on your Drupal site.

  • Go the Modules screen and enable the Locale module.
  • Under Configuration, go to Languages. By default, you’ll see only the language that you selected when installing the site.
  • Click Add language
media_1375275038331.png
  • Choose the language you want to add. In this example, we’ll use French.
  • Click Add language.
media_1375275060204.png

You’ll now see that French has appeared alongside English.

  • Check the Default box next to French.
  • Uncheck the Enabled box next to English.
media_1375275113597.png

Go to https://localize.drupal.org. This is where all of the Drupal translation files are stored.

media_1375275193122.png
  • Click the French language link.
  • You’ll see a download area like the one below. Click the Drupal 7 download link.
  • You’ll get a file with a name like this: drupal-7.22.fr.po
media_1375275214686.png

Back in your Drupal site, go to Configuration > Translate Interface > Import

media_1375275261094.png
  • Click the Browse button to find and import your downloaded French file.
media_1375275313986.png

Volia! Your site’s interface will now be translated.

media_1375275353423.png

Further Reading

If you want to know how to build complete, multi-lingual Drupal sites, try this tutorial.

If you want to translate individual language strings rather than the whole interface, try this tutorial.

If you want an insight into translation improvements in Drupal 8, try this tutorial.

Author

  • Steve Burge

    Steve is the founder of OSTraining. Originally from the UK, he now lives in Sarasota in the USA. Steve's work straddles the line between teaching and web development.

0 0 votes
Article Rating
Subscribe
Notify of
7 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Rodolfo
Rodolfo
10 years ago

Thanks for this, very helpful.
For those having problems downloading the file as .po file, rename the file as .po file right clicking on the new page that shows up after downloading.

steve
steve
10 years ago
Reply to  Rodolfo

Thanks Rodolfo. I popped an answer on the support forum for you on this.

Gabor Hojtsy
Gabor Hojtsy
10 years ago

Changing the default language like that has implications for translating the site. Once you change the default language, all data without language selectors on it, eg. views, content types, etc. will be understood as being in that language, so you will not be able to translate those to French. I would suggest using [url=https://drupal.org/project/fallback_language_negotation]https://drupal.org/project/…[/url] and setting the site display fallback language to French with that.

steve
steve
10 years ago
Reply to  Gabor Hojtsy

Thanks Gabor. That’s true for people with who want multiple languages. This was a more straightforward request from our site’s member … they had just installed Drupal in the wrong language.

Gábor Hojtsy
Gábor Hojtsy
10 years ago

Also, a productivity tip: downloading translations manually is tedious once you have a few modules installed and a theme or so. Then you need to identify version numbers and project names for each and manually download and import files. It is much easier to just go with [url=https://drupal.org/project/l10n_update]https://drupal.org/project/…[/url] which does it all for you automatically (including dowloading core translations). So no manual download and import/upload needed.

steve
steve
10 years ago
Reply to  Gábor Hojtsy

Thanks Gabor. That’s a useful tip. We’ll cover it in a future tutorial.

Sebastian Goin
Sebastian Goin
8 years ago

great

7
0
Would love your thoughts, please comment.x
()
x