On Tue, 15 Feb 2011 11:13:19 -0000, Robert Goldsmith
Idea 1: Create a fake translation class that doesn't actually translate
and which is registered if translation is disabled.
Idea 2: Use conditionals to check if translation is enabled and have
translated and non-translated versions of all elements within the macro.
Obviously idea 1 is 'neater' for the templates but it prob. decreases
performance a bit and I consider it a hack. Idea 2 is more 'pure' but
would add a lot of bulk to the macro templates as well as more
What do people think?
Dummy translator is the way to go.
In terms of overhead, there's possible optimisation that could be added to
PHPTAL: translate constant strings during compilation of template, and
cache template per language.
regards, Kornel Lesiński
PHPTAL mailing list