[support] Multilanguage site and custom theme: file or t() ?

Ivan Sergio Borgonovo mail at webthatworks.it
Thu Jun 25 19:59:08 UTC 2009


On Thu, 25 Jun 2009 17:44:11 +0200
Michel Morelli <michel at ziobuddalabs.it> wrote:

> In a multilanguage file for the themed output (called via 
> theme_render_template) is better the use of one file for each
> language or one file for all with t() function ?

> I think one file for each language.

Definitively the later.
With the later you have:
- automatic fall-back to the main language
- import/export through .po files (and other systems)
- reuse/separation of layout/language
- ... I bet there is more, but the above should be enough

Unless there are reasons to present really different
layout/informations to different audience and building up
conditional logic looks "complicated" you'd better stick with t().

I've used the template system to hide some site dependent
business logic... but that's just a coding debt I had to pay later.

Using template for supporting languages may seems to offer some
advantage when your support for different languages is unbalanced...
but it will bite you back.

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it



More information about the support mailing list