Sorry, you need to enable JavaScript to visit this website.
Multilingual

News Drupal

So you’re using Drupal and you want to make your site multilingual. If you already have experience doing this, chances are you are aware of the relative pains you must go through to make this happen. If this is your first time, well, hopefully I can make your first time less painful. 

Introductory Resources

If you're just starting out and want a good overview of Drupal Multilingual, you're best to start with what the experts have to say on the subject: Drupal Multilingual Guide - contains a list of the basic modules and configuration settings you will need to get your site started. Drupal 7 Multilingual Sites by Kristen Pol - is another good place to start about how you should start thinking about your multilingual site. It's a relatively small book, but packed with a lot of information. It's easy to read and one I continue to reference, so its well worth the $£€ if you're building a multilingual site in Drupal. Multilingual Drupal 7 by Gábor Hojtsy is another good introduction to get you started.

My general piece of advice: Get yourself acquainted with how tricky multilingual Drupal can be before you dive in head first!

 

Ask yourself repeatedly: What kind of site are you translating?

The more you (or your client) needs to translate, the more complicated your multilingual site gets. There are lots of things to consider when building a multilingual site, so do make a list!

There is no one ‘solution’ for building a multilingual site, as all sites are different in their needs. What components of your website are you going to have to translate? some or all of the content? menus? taxonomy? blocks? views? panels? facets? search? webforms? content type forms?  back-end interface? custom modules? the list could go on...

 

Translating Content

Site content will most likely be the main bulk of your translated material, so let's start here. There are two ways you can configure content to be translated. These are 'content' translation and 'entity' translation. The important thing to know is the difference between 'content' translation and 'entity' translation and which solution will suit your needs. You can choose either type of translation per content type, so you don't have to stick with one method. The only drawback to this is that it is a slightly different back-end user experience to translate in the two ways. So if you need to train a lot of translators to use the system they will need to be vaguely aware of the subtle differences, but from my experience it is possible to accomplish! 

 

Content vs Entity Translation

In a nutshell, content translation creates a new node for each translated piece of content, while entity translation creates one node that is shared amongst all translations. For all the detail, see http://www.lullabot.com/blog/article/localized-and-multi-lingual-content-drupal-7#toc-content-translation

And for further explanation on the content translations models as well as where Drupal 8 is going with multilingual, see this excellent talk by Gabor, the Multilingual Drupal 8 initiative lead,  http://vimeo.com/27068202

People are tending toward entity translation as the way of the future (with it being implemented in this way for Drupal 8), but if your site has a many many contrib modules, the more likely that one of these modules won't work with entity translation and you're going to have to either hack the module, write a patch for it, put it in the issue queue and hope someone else writes a patch for it, or just live with the way it works. An example is revisions work differently for the two translation models in that with entity translations revisions happen across all languages (ie. if you revert german content to previous version, ALL the languages will revert to that revision id, since they all share the same revision id) whereas in content translation you can get languages to work independently since they each have their own node (and hence revision id). 

So while entity translation might be the more modern approach to translation, you should still know what content translation is useful for, as you more than likely will still need to use it in Drupal 7 (as I eventually found out)!

Next I will be discussing other things you will probably need to think about when creating a multilingual Drupal site. Things like menus, views, search (Search API + solr), taxonomy, blocks, all the really fun stuff, so stay tuned!

 

 

Tags

multilingual translation drupal language drupal planet