Djula's internationalization API has been overhauled in the darcs repo
past 0.1.1 and the new api will be included in any new djula releases
dictionary variables are now completely separate from normal variables
[those supplied by the programmer or devel dictionaries] and have
their own syntax and namespace. dictionary variables are no longer
html escaped
so if you want to internationalize this template
<p>Click here to go to the <a href='{{zoo-link}}'>Zoo</a></p>
then create a dictionary with the contents:
(click-to-go-to-zoo english "Click here to go to the <a href='{{zoo-
link}}'>Zoo</a>" chinese "<a href='{{zoo-link}}'>I DONT KNOW CHINESE</
a>")
[note: as you can see, languages and variables no longer need to look
like lisp keywords. you can make them look like lisp keywords if
youcwant]
then change the template to
{% dictionary "/zoo-dictionary.lisp" %}
<p>{_click-to-go-to-zoo_}</p>
now (let ((*language* :english)) (render "/example-template.html" :zoo-
link "
http://example.com"))
will return
<p>Click here to go to the the <a href='
http://example.com'>Zoo</
a></p>
and (let ((*language* :chinese)) (render "/example-template.html" :zoo-
link "
http://example.com))
will return
<p><a href='
http://example.com'>I DONT KNOW CHINESE</a></p>
build the html documentation from the darcs repo version of djula for
more info