Re: Templates & Languages

From: Date: Tue, 26 Oct 2004 16:17:53 +0000
Subject: Re: Templates & Languages
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.doc.web 
Request: Send a blank email to doc-web+get-354@lists.php.net to get a copy of this message
Looking back on my template proposal, I propose the following ammendments: 1) Dump my language class. Write something new that uses XML Entities. The entities are stored in [phpdoc-all]/docweb/*.ent; where *.ent is general.ent, revcheck.ent, etc (for each section). If a given entity is missing, we fall back to the english. If entities are insufficient, we could create a simple DTD (something like: <text language="??"><app name="docweb"><entry name="welcome">Welcome!</entry></app></text>)
Agreeded! Just keep the stuff in entities.
2) Keep my templating engine, but remove all text from the templates, using the entities in its place. The templates will remain in [docweb], and only those with docweb karma can change these. Karma should remain "easy" to get. 3) Templates remain PHP, so we don't have to learn/manage/maintain another templating solution, with my same soft-rules in place. (I realize that templating engines/languages such as Smarty are easy to learn and use, but I also don't want to have the debate on which is best, I want to just get moving.. these should be easy to retrofit, if we ever feel compelled).
Yep, just plain PHP :)
4) Other-language templates will rarely be used, but I'd like to keep the request-fallback mechanism in place in case we need to modify markup based on display (right-to-left, long texts, etc) I am still firm on "display code should be in templates", though.
Good thoughts. I would be happy to see an implementation in docweb :)
We all would like to see it on-line :) I'm with little free time, also. My university is too difficult :) Nuno

« previous php.doc.web (#354) next »