Translation Tips and Modules for Multilingual Drupal sites



December 29, 2008

Drupal has some excellent translation functions but deciding which modules to use and how to configure the modules is challenging. There are many different possible configurations depending on your website needs, domain names and content. You'll find there are a lot of choices of modules for setting up a multilingual site.... then there are a lot of key configuration items to enable depending on your website.

This post focused on Drupal 6 modules and issues. We will give some example of the difficult decision making involved in translating content. There is no out-of-the-box configuration that seems to work, it all depends on the needs of your website. There are many different modules to choose from in core and contrib and a lot of their functions overlap.

The best advice is to start with the core multilingual modules and then add other modules when needed. Good Luck Bon Chance Viel Glueck 幸運 Buona fortuna 好运 Buena suerte Удача

Translation and Multilingual Modules

The core modules in Drupal6 you should enable are: Content translation module allows content to be translated into different languages Locale module adds language handling functionality and enables the translation of the user interface to languages other than English.

Suggested Multilanguage modules to enable

Internationalization module provides content translation for nodes and taxonomy, interface translation and browser language detection. Includes a block for language selection. Also included are the Block translation and Menu translation module.

Internationalization includes some the following key modules:

  • Block translation module enables multilingual blocks and block translation.
  • Menu translation module supports translatable custom menu items. See this link for more menu translation info
  • Content type translation module translates content type related strings: name, description, help text...
  • String translation module provides support for translation of user defined strings.
  • Taxonomy translation module enables multilingual taxonomy.
  • Views translation module provides views support for i18n, translation of views strings

Suggested Translation modules to enable

Search and Replace module allows you to perform a search for a string (3 in length or larger) and replace it with another string across whatever content types you define.

Language Sections module was designed for multi-language sites, Language Sections provides a way of storing content sections for different languages in a single text area. Ideal for View headers and footers.

Translation Overview module provides a Translation Overview page provides a table listing the site's nodes and showing what's been translated into each language. It also lets you assign priorities for translating nodes into the various languages

Here is the complete list of available Multilingual modules on Drupal:

Translation issues and quirks with Drupal

Blocks of custom menus must be duplicated. When you create a new page with a menu item, then translate this page, the menu item does not automatically translate. To do so, you must specify a new menu item for the new page - not difficult, but something you should be aware of.

Custom made menu items are language independent. These items are not automatically translated when you change languages, thus you must define a menu item for each language (ie: en/node/add/page, fr/node/add/page)

Since VIEWS cannot translated, this create a number of issues for blocks. Specifically the built-in block for blogs, 'Recent blog posts', will show up on the base language, but not the others. The solution is to create or clone a view with a block, then in your Multilingual settings choose the new language. The nice thing about this solution, is that it allows you to create a new view with translated title, fields, etc... You can also consider installing the i18n views integration module module:

Important Admin Pages

Start with the Translate interface. This page imports the translated strings contained in an individual Gettext Portable Object (.po) file. Normally distributed as part of a translation package your.domain/admin/build/translate/import This string search page allows a translator to search for specific translated and untranslated strings, and is used when creating or editing translations: your.domain/admin/build/translate/search

About The Author

Mike Gifford is the founder of OpenConcept Consulting Inc, which he started in 1999. Since then, he has been particularly active in developing and extending open source content management systems to allow people to get closer to their content. Before starting OpenConcept, Mike had worked for a number of national NGOs including Oxfam Canada and Friends of the Earth.