Re: RE: [SMARTY] using different languages in my Templates

From: Date: Fri, 20 Dec 2002 13:38:10 +0000
Subject: Re: RE: [SMARTY] using different languages in my Templates
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6908@lists.php.net to get a copy of this message
Hi Yuri! > I had a similar problem not so long ago and decided to go for a custom > plugin like this: > {translate key="key_to_translate"} > > The translate plugin used the specified key to lookup a translation in the > database according to the currently set language (which can be stored in the > GET, a cookie, or in the session or whatever). But if I do this, I can get a lot of database-querys! If I have 80 translate-keys, I will have 80 extra and seperate database querys. That must make it very slow, doesn't it? I would like to include_once() a spezial file with a multi-dimansional array with all keys of this template and the according language-strings. But the question is, what should I do to have keep my language-files up to date? I can save the data of all these files in my database, and if something changes in this database, the file(s) have to be created again. Has someone an idea how to build something like this into a smarty-template solution? Kind regards, Andreas ______________________________________________________________________________ Werden Sie kreativ! Bei WEB.DE FreeMail hei?t es jetzt nicht nur schreiben, sondern auch gestalten. http://freemail.web.de/features/?mc=021142

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