[Zope] Re: Multi-lingual sites and workflow

Petr van Blokland buro@petr.nl
Thu, 02 Nov 2000 17:45:05 +0100


Holger,
thanks, I will check it out.
Reason for the different approach is that we have to have
an aditional layer inbetween pages and modules as we call them.

We have a list of modules which are plain texts pieces that can
be on several pages in the site (and other things, they are xml based
and can be used in PDF as well).
There is one template for the whole site (which is a *complete* html
document since just headers and footers won't work most of the time).

Pages are only bindings of module names to labelnames and the
template name to be used for the page.
A typical page is:

<dtml-let
 labelfeature="m.front.feature_css"
 sidenavigation="m.products.sidenavigation_css"

 label1="'m.navigation.panorama_to_building'"
 label3="'m.front.buro_address'"
 label4="'m.front.map_delft'"
 label5="'m.front.working_on_database'"
>
<dtml-with templates>
 <dtml-var template_balloon_dtml>
</dtml-with>
</dtml-let>

The site-template would contain something like:

<span id="navigationtext">
 <dtml-if label1>
  <span id="label1"><dtml-var label1_to_html></span>
 </dtml-if>
 <dtml-if label2>
  <span id="label2"><dtml-var label2_to_html></span>
 </dtml-if>
</span>

<span id="otherlabels">
 <dtml-var label3_to_html>
 <dtml-var label4_to_html>
 <dtml-var label5_to_html>
 <dtml-var label6_to_html>
 <dtml-var label7_to_html>
</span>

<dtml-if label8>
 <span id="sidelabel"><dtml-var label8_to_html></span>
</dtml-if>

One of the advantages this way is that modules take care of themselves.
Adding a parameters in the url will make all the modules add a button
to themselves as link to an editor windows on that module. Page and
template don't need to know.

This contruction has proved very flecxible, but is the opposite from
the translate approach.

Regards, Petr