Re: Flexy and gettext

From: Date: Mon, 10 May 2004 07:34:38 +0000
Subject: Re: Flexy and gettext
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12380@lists.php.net to get a copy of this message
Robert Munteanu wrote:
Hi, How exactly does Flexy work with gettext? It seems to translate only part of my strings, although using gettext functions directly works like a charm.
when you compile a template, it should extract all the strings from the html into an array, and serialize it into {compileDir}/{templatename&path}.gettext.serial You can manually specify sentences or blocks using {_(......)_} (which is replaced prior to the tag parsing.) I just modified flexy to store and retreive unmodified strings (previously it used to do things like replace cr's with \n) When you compile again (assuming you have translated the all the files, and set up gettext ok.) - it should pass the strings in the template through gettext, and write the result to the compiled template. It's known to work ok with pear's translation class, although I've not tested it against gettext() recently, as the servers i'm working with dont use it (and we found it was to much trouble, working with the gettext files.) Regards Alan
Thanks, Robert
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.pear.general (#12380) next »