Re[2]: [SMARTY] using gettext with smarty

From: Date: Sun, 16 Mar 2003 17:23:03 +0000
Subject: Re[2]: [SMARTY] using gettext with smarty
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8678@lists.php.net to get a copy of this message
I use gettext and to extract the strings i parse the templates before passing them on to xgettext() etc. It's not a very good solution, but it works. It shouldn't be too hard to write a xgettext clone though... perhaps ill do it one of these days if i have the energy and happens to be bored ;) (not likely) If you feel like writing a clone yourself you could easily do it in php, see smartys functions for good examples of regexp to extract strings etc. Attached are two scripts that does the work, they go through a number of paths, search and replace templates and phpfiles, write them to a temporary file and pass it on to xgettext. It shouldnt be too hard to modify them to suit your needs, but beware, they are not pieces of art ;) /linus

« previous php.smarty.general (#8678) next »