` is
used to retrieve a template from the file system using a path relative
to the calling template.
The METAL system works with TAL such that you can for instance fill in
a slot that appears in a ``tal:repeat`` loop, or refer to variables
defined using ``tal:define``.
The third language subset is the translation system (known as the
*internationalization language* or I18N):
.. code-block:: genshi
...
You have ${round(amount, 2)} dollars in your account.
...
Each translation message is marked up using ``i18n:translate`` and
values can be mapped using ``i18n:name``. Attributes are marked for
translation using ``i18n:attributes``. The template engine generates
`gettext `_ translation strings from
the markup::
"You have ${amount} dollars in your account."
If you use a web framework such as `Pyramid `_, the
translation system is set up automatically and will negotiate on a *target
language* based on the HTTP request or other parameter. If not, then
you need to configure this manually.
Next steps
----------
This was just an introduction. There are a number of other basic
statements that you need to know in order to use the language. This is
all covered in the :ref:`language reference `.
If you're already familiar with the page template language, you can
skip ahead to the :ref:`getting started `
section to learn how to use the template engine in your code.
To learn about integration with your favorite web framework see the
section on :ref:`framework integration `.
License
-------
This software is made available under a BSD-like license.
Contents
========
.. toctree::
:maxdepth: 2
library.rst
reference.rst
integration.rst
configuration.rst
Indices and Tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Notes
=====
.. [1] The template language specifications and API for the Page
Templates engine are based on Zope Page Templates (see in
particular `zope.pagetemplate
`_). However,
the Chameleon compiler and Page Templates engine is an entirely
new codebase, packaged as a standalone distribution. It does
not require a Zope software environment.
.. [2] The translation system in Chameleon is pluggable and based on
`gettext `_.
There is built-in support for the `zope.i18n
`_ package. If this
package is installed, it will be used by default. The
`translationstring
`_ package
offers some of the same helper and utility classes, without the
Zope application interface.
.. [3] This syntax was taken from `Genshi `_.
.. [4] See the `WebHelpers
`_
library which provide a simple wrapper around this method.