To start, we need to enable the Language module. Check its box and click the Install button at the bottom of the page.
In order to declare additional languages, we need to do the following:
- Enable the language module by checking its box and clicking on the Install button at the bottom of the page.
- Now, when you go to Configuration page (/admin/config), you will find a section for Regional and Language. To start configuring, click Content language.
- Check Content and you will notice that a configuration form will appear, listing each content type. As we are only interested in articles, having a default language as the same would be fine.
- Check the box to mark the content type as translatable.
- A list of fields will appear that will belong to Article. Select all of the available fields.
- After that, check the box that will allow the language to be selected when creating and clicking Save configuration.
In the current version of Drupal (at the time of writing this book), the meta fields should also be selected as translatable. The reason is that if they are not selected, an error will likely be given when trying to save, stating that Non-translatable fields can only be changed when updating the original language. This seems to be a bug, because fields that change, such as the creation or update timestamp, are not translatable. This means that they should not have new values, as far as the translation system is concerned.
- Returning to the Configuration page, we will choose Languages this time. Note that English is already configured as the default site language.
- Click +Add language. A select box will appear containing a long list of languages. For my site, one of the languages will be Spanish, so I'll select that and click to add it. Spanish has now been added, though English remains the default language.
- Click the Edit link for Spanish and change the language name to Español. To me, it makes more sense to display the language name in its own language for those who will be using it. They might not even know what we call their language in English.
Let's add another. This time, I will select Hebrew. Once it has been added, click the Edit link. You will see in the language definition that Right to left is selected, as this is the direction in which Hebrew is written. I'll edit it and translate its name, entering עברית.
That's all there is to declaring languages for use. Now, let's use them and create some multilingual content.