Monday, January 19, 2009

Translating a Drupal Website

And after many many months of procrastrination and delaying, I'm cornered into doing a Drupal website translation into the 2nd language. In my case, the main site is in bosnian and we're adding an english version to it.

My current understanding of the entire process suggests that I'll end up doing quite a lot of duplication of view and block definitions and even panel 2 definitions. That's just something I hate and therefore have been shying away from. I say that this is *my* current understanding and hence may be wrong (which I suspect is the case).

This post will document the process, questions, thoughts, etc - things I hope will be useful to someone else doing a similar translation.


First of all, I'll explain how the current site is organized. 90% of the site runs through Panels 2. I'm using plenty of Views and there are custom content types via CCK. For example, we have Author, Company and Text content types. Text uses Author reference in one of its drop-downs (in this case the author is often someone else from where the article was obtained; the person entering the article into drupal is one of the few admin writers).

There are many Views used everywhere. A common view definition for filters would be:
- node published = YES
- Author node reference = EDITORIAL TEAM Author
- etc.

The biggest problem so far is whenever I have a view that references an author node (the "editorial team" above) that automatically means that:
- Must translate the bosnian version of Editorial Team into its english equivalent (eg. Editorial Team ENG)
- I must create a duplicate view and redefine the filter to use Author node reference = Editorial Team Eng (after switching manually the edit view URL to .../en/.... from .../bs/... so that the english author appears in the filter drop-down)

This is quite a pain and super-demotivating. I can't help but think that I've made some bad choices somewhere or am doing something wrong entirely to be forced to do these duplications.

(to be continued).

No comments: