Re: Multilanual sites using Smarty
| From: | Andrei Zmievski | Date: | Tue, 13 Feb 2001 22:04:34 +0000 |
| Subject: | Re: Multilanual sites using Smarty | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-116@lists.php.net to get a copy of this message | ||
On Tue, 13 Feb 2001, Jonas Bengtsson wrote:
> Hello,
> I'm developing a web-based system that shall support many languages. It
> shall be as easy as possible to add and change languages.
> One way to accomplish this is to use config files and have all strings in
> them. One config file per language would be easiest when adding new
> language. But will this be to inefficient? Because there are no possibility
> to choose multiple sections in config_load you must perform multiple
> config_load.
> There are also problems when I have to choose which string to show from the
> php script. Then I have to first config_load in my php script to get the
> string I want (for instance an error message) and then in the tpl script
> config_load for all other strings. This is not to prefer. I want to load all
> strings on one place.
> Is there a better way to solve this?
The Config_File class is written in such a way that when you call get()
method for the first time it loads the whole config file into memory and
then subsequently only returns the data from memory. So, it's pretty
efficient..
-Andrei
* Only 19,999 lines of C++ to my next ski trip... *