In this article, we will learn step by step how to setup a Drupal 7 multilingual Site step wise.
All you need to know is Basic Drupal 7 concepts. You should be familiar with Drupal’s admin configuration system, Installing and enabling contributed modules.
So, let’s proceed with step wise multilingual site setup in D7.
Step wise Drupal 7 multilingual site set up
- Download and install Drupal 7.
- Download Contrib Modules:
- Enable all downloaded modules including Locale Module. It is a part of Drupal core.
- Configure Languages, do admin login and go to configuration >> Region and Language >> Languages “admin/config/regional/language”.
- Add Language, Drupal supports more than 180 languages, you can add as many as you want (of course one by one).
- Once you have added other languages, choose a detection method (admin/config/regional/language/configure). There are some ways of language detection, choose one and save the configuration.
- URL (Mostly used by content based site, determine the language from the additional parameter in URL).
- User (Refers to user’s language preference).
- Browser (Determine the language from the browsers language setting).
- Configure translation updates:
- Set Translation Source to “Local files only”.
- Set import behavior to “Overwrite existing translations”.
- Import translations. Go to “admin/config/regional/translate/import” and upload the Language file (You can get this language file from https://localize.drupal.org/). Select the “Import into” language and start the import. You can translate manually as well from “admin/config/regional/translate/edit/1".
- Add translation to the content types:
- Go to Structure, then Content types. Edit the content type, in which you want to add translation. Under “Publishing Options” you will find Multilingual support marked as Disabled. Check “Enable with Translation” and save the settings.
- Make each field translatable. Open “Manage Fields” tab, click on replace in front of title field and check the checkbox and save.
- Edit all other fields and check “Users may translate all occurrences of this field”.
- Add Content:
- Go to Content >> Add Content >> [Content type], which you just configured.
- Add the content, and select the language which adding content.
- While editing content, you will find a new tab “Translate”, use this for adding translations in all the languages you want.
- Add Language switcher block, go to Structure >> Blocks and enable Language switcher (Content) and Language switcher (User interface text) Blocks.
That’s all you have successfully implemented Drupal 7 Multilingual capabilities to your site, Congratulations.