You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Joachim Zobel <jz...@heute-morgen.de> on 2007/04/17 22:24:41 UTC

Announcing mod_xml2 and mod_i18n

Hi.

Finally my current project reaches early beta. It consits of two
modules, mod_xml2 and mod_i18n.

mod_xml2 is a filter generating SAX buckets which replaces mod_expat. It
uses libxml2, which offers much more funtionality than expat. This
functionality is used to implement mod_i18n.

mod_i18n implements the zope i18 namespace
(http://xml.zope.org/namespaces/i18n, see
http://plone.org/documentation/how-to/i18n-for-developers for an
explanation). It does gettext based translation as an apache output
filter. This means you can have a _uniform_ translation layer for all
html your apache sends out. 

To get this you need to add i18n:translate attributes to all html tags
whose content shall be translated. You then need a tool like i18n-fool
to extract the text you want to translate. The actual translation can be
done with gtranslator or a similar PO editor. 

mod_i18n works saxian/streaming until a translate attributed tag is
encountered. It then starts building a tiny tree for the subdocument,
which is manipulated with libxml2 tree functions and then translated
back into sax buckets.

This should scratch a big itch for many people. The average european
online shop, which is written in PHP with a few Perl scripts and several
static pages, needs to be translated to 5+ languages. This can only be
done when content and layout are seperated. 

The modules can be found here:
http://www.heute-morgen.de/modules/mod_xml2/
http://www.heute-morgen.de/modules/mod_i18n/

They will get further testing and get those little details (such as
better documentation and examples) to make them usable during the next
months.

Sincerely,
Joachim