The arrival of Drupal 6 saw Translation become a core module, which has made it even easier for developers to offer their sites in multiple languages. The change can be seen from the very start of site development, as there is now an option to install Drupal in languages other than English. This can be done by downloading a language pack (available from http://drupal.org/project/Translations) and extracting it into the root Drupal directory. When you next go to the browser installation page, your extracted languages will be available for selection. Additional languages can be added via the Add Language page (Admin > Site Configuration > Languages > Add Language). Here you can choose a language from the list, or add a custom one of your own. This can be set as the new default if required.
The Configure tab of the Languages section allows you to set how the site determines which language to display. The main way this is done in Drupal is by using a Path Prefix. Each language is assigned a prefix code, which can be inserted into the URL path to help Drupal identify which language to switch to.
For example, www.example.com/fr/node/1 will locate notice the ‘fr’ code in the address and use that to switch to the French translation of the page.
For further support, there is another option called ‘Path Prefix with Language Fallback’. This means that if there is no prefix path in the URL, then the site will switch to whichever language the user has chosen in their profile. If this has not been set, then the site can detect what language the user has set their browser to, and if possible serve a suitable language to them. ‘Domain Name Only’ means that a language switch will only occur if the site domain address matches one (e.g. http://es.example.com/about will match to Spanish).
To match a domain to a language, or change the Path Prefix code, go to the Languages page and select the ‘edit’ link next to the desired language. The Localization module is a great way to quickly translate site content. This provides a GUI interface on the screen which gathers the text content from the currently viewed page. Selecting a piece of text from the list will allow you to enter a translation for it. This is a great site aid which greatly speeds up site translations.
You can also add translations using the Translate Interface (Admin > Site Building > Translate Interface). Here you can enter search the site for specific strings to translate, import already translated content via .po files (available from Drupal.org) or extract whole .po files for modules and themes for offline translation.
The variety and ease of site translation in Drupal 6 makes it much easier to create a site with multiple languages than before.
(This blog post has kindly been referenced on Drupal.org at: http://drupal.org/node/329366)







