Multilingual support

Last modified: August 10, 2009 - 15:38

Drupal modules may be installed on sites in different languages, or even multi-lingual sites. For that reason, if your module will be distrbuted to others, it is a good idea to build support for different languages into your module.

The basic steps for building in multi-lingual support are:

  1. Ensure the code-based strings in your module (i.e. literal text that is shown on your module's screens, blocks, etc.) are translatable. See the Localization API handbook section for information.
  2. Create translation templates (POT files) for your module (if it is publicly available), so that people can translate it into different languages. See the Translation of contributed modules handbook section for information.
  3. Place POT files and any translations that others may contribute (PO files) into the 'translations' sub-directory of your module.
  4. If your module stores user-entered information outside of nodes (settings, custom database tables, etc.), ensure that that information can be translated. See the Making your Custom Data Translatable page for more information.

The following resources on internationalization in Drupal 6 are also useful for reference. (Also, check out the sub-pages listed at the bottom of this page.)

The Internationalization group at groups.drupal.org is a site for collaboration and support around internationalization.

 
 

Drupal is a registered trademark of Dries Buytaert.