Re: [SMARTY] smarty and GNU gettext

[email protected] (Marcus Bointon) Tue, 30 May 2006 14:40:44 +0100
Newsgroups php.smarty.general
Message-ID <[email protected]>
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
[email protected] | http://www.synchromedia.co.uk