Re: [SMARTY] smarty and GNU gettext
| From: | Marcus Bointon | Date: | Tue, 30 May 2006 13:40:44 +0000 |
| Subject: | Re: [SMARTY] smarty and GNU gettext | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-13443@lists.php.net to get a copy of this message | ||
On 30 May 2006, at 14:22, Vicente Werner wrote:
You really don't want to use it, since the performance gains are negligible from a custon made library getting the stuff from a DB -I've done and made benchmarks and the results are similar with an edge going to custon made libraries when you're using high ammounts of translated terms- .Personally I think gettext is a clunky way of working anyway! I'm using a DB-based one at present - it's nice to have a separate web interface for translators to use independent of web apps.
For legibility reasons I implemented my system as block plugin: {translate}text{/translate} and added some localization functions to deal with numeric format etc..I've done it as both block and function - I find functions are tidier for small things like field titles. I've yet to come up with a nice way of handling embedded variables like gettext does, especially with numbered params. Any ideas on that? Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture marcus@synchromedia.co.uk | http://www.synchromedia.co.uk