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.
M.
You probably want to pass your strings in a t function. Maintaining multiple identical files makes no sense.
Michel Morelli 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.
M.
On Thu, 25 Jun 2009 17:44:11 +0200 Michel Morelli michel@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.