Yeast templates translator

You can rad more about template translation foundations in this page.

Download the standalone translator

You can download the translator from the download page.

NOTE: If you use Yeast server to serve Yeast templates in your web application, you can configure the server to automatically translate your templates.

Using the standalone translator

The translator uses the jTidy HTML library to parse the template and transform it. During the parsing phase, some errors or warnings can be found.

The translator is packed in the ysttrl.jar java executable file. To translate a template named <file> type down the following command in the operating system console:

java -jar ysttrl.jar [-p <path>] [-o <dest_file>] [-v] [-c] <file>

where the options mean:

-v

verbose; the translator shows information about the translation process, including transformation warnings. Errors are always shown

-c

cacheable; the translated template body is stored separately in a js file. The resultant template is an skeleton-template whose body contains an script that loads the previously mentioned template body.

-p <path>

specifies a directory where the source template is taken and the translation result is stored. The default directory is “.”.

-o <dest_file>

specifies the result file name. By default ysttrl adds the “_t” suffix to the source template name, and the "_t_b" suffix to the template body if the -c option is specified.

Examples

java -jar ysttrl.jar templ.html

Translate the template ./templ.html into the ./templ_t.html file.

java -jar ysttrl.jar -p yst -o templ2.html templ.html

Translate the template yst/templ.html into the yst/templ2.html file.

java -jar ysttrl.jar -c templ.html

Translate the template ./templ.html into the ./templ_t.html and ./templ_b.js files. The ./templ_t.html file loads ./templ_b.js.

On-line translator

We provide you with a on-line translation service. Try it!