TinyTemplate is a small single-file templating engine in Java. A PHP version is also available.
Templates can access the available variables and nested fields/values, format the values dependent on the locale. Conditional statements and loops are also supported.
The aim is to provide an easy to use API for different programming languages and template engines that wraps and enhances existing gettext functionality.