Re: [SMARTY] using different languages in my Templates

From: Date: Fri, 20 Dec 2002 14:52:08 +0000
Subject: Re: [SMARTY] using different languages in my Templates
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6915@lists.php.net to get a copy of this message
Hi Yuri! Thanks for your idea, but 2 things I don't like very much: 1. SELECT * FROM wordlist WHERE key in (commaSeparatedKeys) 2. parse the template twice by regEx. What about my new idea (a mixture of my old an yours): If the plugin translate gets the first call like that: {translate key="key_to_translate} It will call all data for database, the data is stored like this: key|script_name|EN|NL|DE... So I get a query like SELECT * FROM translate_table WHERE script_name = '$script_name' After that the script should generate an array with all the data in it. So if the next {translate key="key_to_translate} comes, the data could be taken from array. Is it possible like that? What if I change something in my database, but not in my template, could I somehow create a new template_c? regards, Andreas

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