Re: More ideas for translation support (long)

From: Date: Mon, 30 Jul 2001 07:35:44 +0000
Subject: Re: More ideas for translation support (long)
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1294@lists.php.net to get a copy of this message
On Tue, Jul 24, 2001 at 12:07:46PM +0200, Hans-Peter Oeri wrote: > > Maybe. I've been looking in the code, and if you would alter > > Smarty.class.php _fetch_compile_path() (in a subclass or otherwise), > Now, we have two possibilities: > a) subclass (and probably rename the method as it is "officially" > subclassable then... > b) something like the register* functions > Actually, I would prefer a register* solution, just because of the > uniformity of the API (a "usual" user of smarty does not really need > to subclass...). However, a subclass would be more "clean" as more > than one compile path should not exist... 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 is like "$prefix/$lang/$filename"; now, if a user sets $lang to 'fr', the cache files will be made in (assuming $prefix is /tmp/phpcache) /tmp/phpcache/fr/filename; if the user didn't set $lang, and left it to the default of '.', the file will be cached in /tmp/phpcache/filename. I hope I explained it clearly. cheers, roel -- * Nothing wrong with W2K that a total redesign and rewrite can not fix.

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