[Petal] Petal-2.16 released

Bruno Postle bruno at mkdoc.com
Fri Mar 18 17:50:15 GMT 2005


On Fri 18-Mar-2005 at 12:32 -0500, William McKee wrote:
> 
> > - Included template language inheritance now works
> 
> What issue does this address? I'm not sure I understand what
> 'template language inheritance' is.

This is the older pre-gettext version of Petal internationalisation.

Basically you can invoke Petal like this:

  my $template = Petal->new (file => 'foo');

If foo is a directory rather than a file, Petal will look in it for
a template called en.xml (or en.html, it doesn't seem to be too
concerned).

If on the other hand you do this:

  my $template = Petal->new (file => 'foo', language => 'de');

Petal will look for a template called de.xml (it will default to
en.xml if that doesn't exist).

So you can have a set of templates that are completely or partially
translated into one or more languages.

Specifically, you might want a 'parent' template to remain
untranslated, but want included templates to have multiple
translations - The system was broken for includes and metal macros,
but now it works.

-- 
Bruno


More information about the Petal mailing list