1 shot translation

From: Date: Sun, 31 Mar 2002 15:20:19 +0000
Subject: 1 shot translation
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3413@lists.php.net to get a copy of this message
I know that the way to deal with multilingual translation is a hot topic on the smarty mailing list. I made a smarty function to achieve translation, and I request this process by putting this in my template. {translation VERBOSE="never"} It takes the translation from a database or from a php file containing an array AND IT WORKS FINE!! MY PROBLEME IS: When a have a section which outputs 90 rows with 3 translation by rows like {translation VERBOSE="change"} , {translation VERBOSE="delete"} {translation VERBOSE="details"}, it proceeds to 270 translations => 270 HITS ON THE DATABASE TO TRANSLATE 90 TIMES THE SAME THING!!!!!!!!!!!!! What's the solution?? PreFilters??? PostFilters??? Are postfilters executed at every request of an already compiled template??? If YES, could it be possible to build a postfilter to parse the compiled template to find particular tags and to replace them with a single needed access to the DB????? Friendly Olivier Any sufficiently advanced software technology is indistinguishable from magic - Arthur C. Clarke

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