Re: More ideas for translation support (long)
| From: | Hans-Peter Oeri | Date: | Mon, 30 Jul 2001 07:52:05 +0000 |
| Subject: | Re: More ideas for translation support (long) | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1295@lists.php.net to get a copy of this message | ||
Hi!
Quoting Roel Vanhout <roel@2e-systems.com>:
> Maybe I didn't get this correct, but I think there is an easier way to
> solve this different compilation path thing. If the default value (the
> value that is used when no translation is needed) is set to '.' , then
> there will be no extra subdirectory created. Eg: code to compose path
At first, I thought of some sort of a hybrid solution: No additional
subdirectory for compile_id == null, but all compile_id != null in a
subdirectory. That would surely be "easier" for those NOT needing that feature.
However, if I remember correctly, the cache name algorithm created
subdirectories for null ids, too. And after all, one does not need to manully
access the compiled templates on a regular basis and the directory is created
once. Although directory creation is an expensive action, I don't think anyone
will loose performance...
So I just went the way of least resistance and stuffed everything in a
directory. Of course, the methods could be enhanced to access not only the
directory contents (for id != null) but also a file in the "main" directors
(for id == null).
> the default of '.', the file will be cached in /tmp/phpcache/filename.
> I hope I explained it clearly.
Yup, but I think if we keep the algorithm more generic, we don't run into the
next wall. With a generic compile_id, I can not only include the language, but
whatever I want in there... For whatever I think I need a prefilter, I can
base the compile_id on its parameters and get distinct compiled templates.
Don't conform!
IkKampfCaspar75