RE: RE: [SMARTY] using different languages in my Templates
| From: | Yuri Weseman | Date: | Fri, 20 Dec 2002 13:58:56 +0000 |
| Subject: | RE: RE: [SMARTY] using different languages in my Templates | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6912@lists.php.net to get a copy of this message | ||
Oops typo in my last post. I meant: implode! see also:
http://www.php.net/manual/en/function.implode.php
> - with impode you should be able to create a comma-separated list of all
the
> keys used in your template
Yuri
-----Original Message-----
From: Andreas Korthaus [mailto:akorthaus@web.de]
Sent: Friday, December 20, 2002 2:38 PM
To: smarty-general@lists.php.net; Yuri Weseman
Cc: Andreas Korthaus
Subject: Re: RE: [SMARTY] using different languages in my Templates
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
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php