[kdewebdev-site] Phase I design and development opportunities
Chris Hornbaker
chrishornbaker at earthlink.net
Fri Apr 16 00:00:20 EDT 2004
On Thursday 15 April 2004 21:59, jacob coby wrote:
> --- Eric Laffoon <eric at kdewebdev.org> wrote:
> > Chris has proposed an idea based on what KDE does.
> > In reflection I think KDE
> > was set up with this interesting and unique
> > procedure because of their
> > familiarity with the tools. In thinking about this
> > the idea of being able to
> > use an XML processor within PHP and the ability to
> > add tags in XHTML gives me
> > the idea that this abstraction could be accomplished
> > using XML. It would
> > require a definition of the page layout elements and
> > an XML name for those
> > elements which would make content writing sort of
> > like writing docs.
>
> Before I start thinking about this more, just to be
> sure, this sounds like you want to do a template
> system of sorts in XML?
>
> <page title="A page at kdewebdev">
> <nav section="some:where:in:kdewebdev" />
> <content>
> <p><t>This is some text to be translated</t></p>
> <p><t>Quanta at <url src="http://quanta.kdewebdev.org"
> text="quanta.kdewebdev.org /></t></p>
> </content>
> </page>
>
> (<t> = text to translate. Just a time-saver over
> typing <i18n> or <l10n>.)
>
> Once you have this, we'd then run some sort of XML
> processor written in PHP to generate the final .php
> file?
>
> > Ironically it would even be possible to still use
> > elements of Chris' PHP code
> > and solution here. My problem though is that I don't
> > want to require every
> > string to actually be written in a PHP function and
> > I want the translation to
> > be as web developer oriented as possible.
>
> Just to expand on Chris' response, since the
> translated files would (could?) be an include() based
> on your language, it would be fast and easy on the
> server (esp. if an accelerator were installed such as
> zend or PHP-Accelerator).
>
> <p><i18n>Some Text</i18n></p>
> <p><i18n>Some other text</i18n></p>
> could become:
>
> <?php
> // logic to setup $lang here (cookies, defaults,
> verification)
>
> include ("lang/$lang.php"); // en.php, de.php,
> whatever
> ?>
>
> <p><?=$i18n_0?></p>
> <p><?=$i18n_1?></p>
>
> -- eof
>
> We include ~600k per page with PHPA running, and it
> only takes about 0.05 seconds to do the include.
>
I wanna hold Jacob back. All of what Jacob speaks is already doable (and then
some!) with the PHP code I presented some time ago. So if this is what's
being thought of, then please consider improving already available code
instead of re-inventing the wheel.
--
Christopher Hornbaker
Jabber ID: Jilks at jabber.org Email: chrishornbaker at earthlink.net
Join the Free State Project! http://www.freestateproject.org
"Liberty in Our Lifetime"
Was I helpful? Let me know! http://svcs.affero.net/rm.php?r=Jilks
More information about the kdewebdev-site
mailing list