Re: More ideas for translation support (long)

From: Date: Mon, 23 Jul 2001 14:40:10 +0000
Subject: Re: More ideas for translation support (long)
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1246@lists.php.net to get a copy of this message
Hi! I would like to join the discussion on translation support. As I live in Switzerland and we have four national languages plus English I have to support for every site ;> As for the new resource handler: What about the next include? I may well include en.foo.tpl... But what if foo.tpl includes another file? The language information is lost there, isn't it? Actually, I think, smarty definitely has to be "enhanced" in some way or the other. I really like the idea of separating the translation process of the rest. But IMHO a calling convention is a must! I suggest we introduce into the "main" smarty: - hooks for the translation (just before compilation seems to be the best place, no?) - parameters for display() et al and {include ...} et al to select a language (which should cascade for nested includes, of course) The main smarty should call the translation handler and save one compiled template per language (performance MUST). The translation itself can then be taken care of however one wants. If there are then REALLY different methods of translation, one could change the translation handler quite easily! Just my 2 cents Hans-Peter Oeri AKA IkKampfCaspar75

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