How to Make Your Drupal Website Multilingual
As the site manager for acquia.com, I had a lot to think about when we originally decided to translate the site into other languages. Why are we translating? What will we be translating? How will we handle pages that aren’t translated? What modules do we need to add? What translation services will we use? How will we maintain all languages? What are the best ways to achieve my goals in Drupal 7? My past experience with translation in Drupal was with a Drupal 6 website and we did a multisite install, so we shared modules and themes but had separate websites and databases.
Why are you translating your website?
There are many reason to translate your website: increase site traffic, increase sales, competitive edge, courtesy for customers. Acquia was looking to start expanding business in the French speaking market so we kicked off our first website translation effort in French. Since we have launched our French site, we have increased our site traffic from France by 30 percent.
What happens if you don’t want to translate a page?
Depending on your site or your business, it might not make sense to translate all content on your website. If you don’t translate all your pages, you need to make a decision on how to handle those pages that aren’t translated. We decided to translate our main product pages and all static content such as our contact us and about us pages.
Ways to Translate content in Drupal:
Drupal 7 had some improvements for translation capabilities and our two options were content translation (AKA node translation) or entity translation.
- Content Translation = one node per translation
- Entity Translation = one node with many translation
Here are some differences between the two options we discovered.
|Only works on nodes||Works with any entity|
|One node per language||One entity for ALL languages|
|Uses core node title "field"||Requires Title module|
|Views language filtering works||Required a patch to filter on entity language|
|XML Sitemap works||XML Sitemap could not filter on entity language|
|Block translation is tricky||Bean block module|
|Multiple menu items per language||Single menu item per language|
What Modules will you need to add? With entity translation there are some requirements:
Content Translation needs:
What translation services will we use?
This is really up to you. There are many services out there that provide translation for varying costs. The services I’ve used are Transperfect and Lingotek. You’ll need to find a service that can cater to your business and once you find a good translation service stick with them so your message stays consistent.
How will we maintain all languages?
I’m not sure I’ll ever find the best way to individually maintain each language variation on our sites but having a change management process is the right way to start. All site changes now need to be considered for translation. The challenge here is to getting your whole company to think translation first. This is a new way of thinking when you step into translation for the first time. A small text change on your website will now take three times as long. When we launch a new page, we do the translation process during design, this way our design is created to easily handle the longer character set of our languages.
How we did it:
We decided to initially go with entity translation for acquia.com, but after implementing the French language with entity we decided to migrate to node translation because of issues with several contrib modules e.g. menu blocks, breadcrumbs (via Delta module) and XML site map. We are actually now using a mix of node translation and entity translation. To send our content to our translators, we have created a view to export nodes we want to translate into XML, send the XML file to our translators and when they send it back we copy and paste content into the new nodes. We stlll need to find a management system for our translations. We have learned a lot and still have more to learn.