SV: Multilanual sites using Smarty
| From: | Jonas Bengtsson | Date: | Tue, 13 Feb 2001 22:36:19 +0000 |
| Subject: | SV: Multilanual sites using Smarty | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-119@lists.php.net to get a copy of this message | ||
Okey. So even sections of config files that are not requested from
config_load are loaded into memory? Then it's not such a good idea to gather
the strings for the whole site into one config file? They might get pretty
large...
/Jonas
> -----Ursprungligt meddelande-----
> Fran: Andrei Zmievski [mailto:andrei@ispi.net]
> Skickat: den 13 februari 2001 23:05
> Till: Jonas Bengtsson
> Kopia: smarty@lists.ispi.net
> Amne: Re: [smarty] Multilanual sites using Smarty
>
>
> 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... *
>