Setup a Multilingual Drupal Site
In this section, we will cover all the steps to perform to setup the baseline required to have enable the multilingual support of the OSF for Drupal modules.
One of the core set of Drupal Multilingual tutorials has been written by Gábor Hojtsy and is available here.
Enable the Local Module
The first step is to enable the
Local module. This module is part of Drupal Core:
Once you checked the checkbox, save the modules settings.
Enable a New Language
The next step is to enable a new language in the Local settings. Go to the
Regional and Language settings, and click the
Then click the Add langauge link to add a new language that you would like to handle in your OSF for Drupal portal.
Once you click the
Save configuration button, your Drupal instance will now be aware of the new language you just configured.
Now that you handle a new language in Drupal, the next step will be to update the language packages available for this language. The first thing you have to do is to download the
l10n_update Drupal module, and to enable it.
Once this module is enabled, you will go to the Configurations, and then click the
Translate interface link.
Then you will click the
What this section does is to help you adding and updating the language packages of all the modules you currently have on your Drupal instance, with the languages you selected previously. There you will have to choose update options that best fits you needs, and click the
Update translations button.
Setup Language Detection
The next step is to choose how you want Drupal to detect the language to use to display the content into generated Drupal pages. There are multiple options to do that. Go to the
Languages configuration section:
Then click the
DETECT AND SELECTION tab:
Finally choose the mechanism you want to use to do this detection.
Install and Enable the i18n Module
The next step is to download and enable the i18n (internationalization) module. This module gives access to a series of multilingual API functions, and a multiple of user interfaces that will help us properly managing the multilinguality capabilities of Drupal.
Once the internationalization module is enabled, you should also enable the following modules:
- Block languages
- Field translation
- Menu translation
- Multilingual support
- Multilingual select
- Path translation
- String translation
- Variable translation
Enabling Multilingual Support for Every Content Type
The final step that will be required is to edit all the content type that you currently have on your Drupal portal, and to enable the multilingual capabilities of each of them that you want to translate. What you have to do is to edit one of the content type (the Page content type in this example):
The you have to click the
Publishing options vertical tab. Finally you have to
enable (with translation) the content type.
Once all these steps are done, you will be able to translate all the content types pages on your Drupal instance. However, this is out of the scope of this article. If you want more information about doing this, we strongly suggest you to read Gábor Hojtsy's series of articles covering these questions in details.