Re: translation
| From: | Hans-Peter Oeri | Date: | Mon, 13 Aug 2001 11:27:32 +0000 |
| Subject: | Re: translation | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-1333@lists.php.net to get a copy of this message | ||
Hi!
Quoting Holger Bahr <hb@tsi-gmbh.de>:
> i am using smarty on a multi-language site (dev-status)
> and use gettext(), not smarty itself for translation.
Of course, you can use gettext (directly or as a smarty function). However,
using any after-compile translation, you
a) cannot use functions/vars in the translated strings
(which is necessary for complex changes)
b) hit a performance bump, because translations are usually quite expensive
and - without any need - are repeated with each invocation!
Don't misunderstand me... If you're happy w/ a gettext solution: great.
However, my suggestion should open up different possibilities without doing any
damage to anyone.
And, after all, the introduction of a compile_id doesn't seem to break
the "mental logic" behind smarty - at least for me! - as it's just an
equivalent to the cache_id.
Don't conform!
IkKampfCaspar75