Tips for Translation in Drupal 6 Websites

translate

Tips for Translation in Drupal 6 Websites

Translating Drupal websites into multiple languages is very similar to visiting a foreign country. You have to spend time and money properly preparing documents, it's easier if you know the language and culture and you may find yourself stepping out of the comfort zone you are accustomed to. While translating Drupal websites into multiple languages sounds easy enough, there are many components that lead to time and cost overruns if not planned for. Differences in word length, right to left languages, properly handling string overrides, and customer data capturing are just a few things to think about. Here is my assessment of Drupal 6’s ability to easily translate websites:

Translating Nodes

Translating Nodes was obviously the major focus of the Internationalization (i18n) module when it was released, and for good reason. Node translation is by far the simplest task to complete when translating a Drupal website. Once the i18n module is installed and languages to be translated are configured, you will notice the ability to choose a default language directly within the node edit page. Once you have selected a default language (example: English) and select save, you will then be provided with a new tab at the top of the node edit page called Translations. This tab allows you to then create new content for chosen languages and automatically associates those nodes together. Alternately, you can create nodes as you would for any page with no language specified, and then spend a significant amount of time mapping those pages together. I DO NOT recommend this process, but this is what will end up happening if you do not properly train your content editors to first select a default language, and then add additional languages through the Translation tab.

Translating Menus

With Drupal core alone, user defined menu items are not translatable. The i18n_menu (Menu translation) module (part of the i18n package) provides the following features:
  • Allows setting a language when creating a custom menu item so that the menu item will only show up for that language.
  • Localizes other custom menu items without language. Use the 'Translate interface' pages to translate these menu items.
A menu item linked to a node, due to how the menu system works and the 'Language selection' feature in i18n, will be displayed only when the node language matches the page language. The Menu translation module relies on themeing and blocks for displaying the right links for each case. Thus for uses different than displaying the menu in a block, it may not always work. Another gotcha that can add significant time to a project is the length of translated words compared to your default language. For example, “Managing Performance” translates to “Gestion des Performances” in French. This can cause significant layout issues if not properly planned for during the initial design of the website. I highly recommend starting with menu navigation translations to determine potential issues before you begin the project and estimate time for fixing styling issues that will most certainly arise from adding new languages.

Translating Mail Templates

Have you ever created an account, lost a password or registered for a newsletter? If so, I can tell you for a fact that the email messages you receive after doing so do not translate themselves! As a matter of fact, the i18n module does not even natively handle those translations. In order to properly translate those notifications, you must download, install and configure the Mail Edit module from Drupal.org and ensure Locale is turned on within Drupal’s core. This module then allows you to add language specific notifications for the user.

Translating Forms

Translating forms seems like a straightforward process, until you realize forms cannot be translated through the node edit interface. Instead, you must translate each form element via the String Overrides interface. And if that’s not enough, you will need to do some manual programming within Drupal to wrap some of the labels in (t) strings. You will also need to ensure that you are adding the correct label names in the Original field, or the strings will not translate properly. In my first experience with translations, this was by far the most frustrating issues we ran into.

Translating Blocks

Since blocks are not nodes, they cannot be translated through the node (Translation) tab as mentioned above. Blocks are translated through Translate Interface. The Translate interface provides a search box allowing administrators to search for block titles and body content, then translate and display various languages through string overrides. In closing: Although significant enhancements have been made to Drupal Internationalization, focus should be drawn to making blocks, forms and email templates more easily translatable. While I have not yet translated a Drupal 7 website, I hear there have been significant improvements. I look forward to hearing your feedback and discussions on this topic. What are your thoughts?

Related Posts

Travel Websites Built with Drupal

Anima Bajracharya
Read more

Higher Education Websites on Drupal

Jerad Stewart
Read more

High Tech Websites on Drupal

Brandon Reid
Read more

3 Tips for Choosing the Right Drupal Company

Chris Sloan
Read more

Webinar Recap: Building Intelligent Websites with Drupal

Felipa Villegas
Read more

No More Excuses for Ineffective Websites

Tom McCracken
Read more