Multilingual Drupal: Some Dos And Don'ts

Photo of Greg Harvey
Sat, 2010-01-30 14:06By greg

So we've done all French sites before. And we've done all English sites before. But a recent project was our first real forray in to multilingual sites and it's an e-commerce/Ubercart job! Talk about gluttons for punishment!

There are bags of tutorials, so I'll keep this short but sweet. A list of dos and don'ts from our painful, recent experience:

  1. Don't change the default language after initial set-up. Set your default language right at the start and don't mess with it. Ever.
  2. Do give each language its own weight. I'm not sure why, but this seems to fix certain situations where Drupal seems to get confused about which language it should select for an element of the UI.
  3. Do back up your database before installing someone else's PO files. Sometimes they're a pile of crap and there's no easy way (I know of) to back out.
  4. Don't add menu items using the Views module (unless they're tabs). Use the core Menu module or you'll confuse yourself to death.
  5. Don't forget your default language - it may not be English even if you normally work in English.
  6. Do enter everything in the default language first, then translate later. It's just safer that way.
  7. Don't set Taxonomy vocabularies to a language. For some reason it seems to lock them like that forever! Leave them language agnostic and translate them. Then the language switcher will do its thing.
  8. Don't forget, multilingual variables are set, as usual, in the admin UI. All you need to do is set the URL/sub-domain (depending on how you configured language switching) so you are in that language's view of the UI, then enter the variable value for that language. This is the case even if you set the language to be one specific one always in admin.
  9. Don't translate blocks. You'll confuse your client to death when you try to explain to them how to create and edit translations. Just create one block per language, as needed.
  10. Don't install BlockTheme. It's a great module, but it doesn't work at all with i18n (yet - I've been chatting to Jacob Singh about CVS access to fix that, when I have time).

I may add to this in time.