[Drupal] Localization in Drupal sites
First of all, Why we need to choose Drupal for implementing multilingual sites?. Drupal 7 is having the flexibility and scalabilty, compared to any other content management systems, online tools and desktop programs. So its very easy to maintain a multilingual site, which is essential for corporate sites.
After choosing Drupal, we should list out the available localization modules. Internationalization is a widely used module, which is extendable to handle any requirements. As its having many features, obviously it will become little bit heavy.
Another option is to go with 'entity translation' module. While choosing 'entity translation module' we need to find a solution to handle the titles of the content, which will not handled by entity translation. For handling titles a module named 'Title' is available which will 'Replace title with a field instance'.
The main advantage of choosing Entity translation module is that, it is included in the core of Drupal 8.
How entity translation module can be installed and configured?
- Like any contributed modules, unpack and install the entity translation module.
- Install the title module to set translations for the title.
- Add po files of required languages at 'admin/config/regional/translate/import'.
- Set English(en) as default language at 'admin/config/regional/language' and prefix language code by editing the listed languages as required.
- Configure the translatable entity types at 'admin/config/regional/entity_translation', select the default language for each content types (check 'Hide language selector' if using 'Language Switcher Dropdown').
- Edit the content type that requires translation. Go to publishing options and select 'Multilingual support' as 'Enabled , with field translation'.
- Enable translation for all required fields by editing the fields at admin/structure/types/manage/%/fields.
- For title field, there will be an option to replace the title field with a field instance
- Install 'Language Switcher Drop down' module and assign the block 'Language switcher dropdown (Content)' to a region, So users can easily switch all available languages in the site.
As no coding is required to implement a multilingual site, its really easy. Lets try!