Guys, please ! Try to use the translator: <your folder>/ /translator <--- product translator /en/ <--- DTML-Methods returning the strings/pages for english /fr/ <--- DTML-Methods returning the strings/pages for french /de/ <--- DTML-Methods returning the strings/pages for german /nl/ <--- DTML-Methods returning the strings/pages for netherlands So now you do have the e.g. index_html in <your folder> (content between ----): ---- <dtml-var header> <!-- your standard header --> <h1><dtml-lvar welcome><h1><!-- your welcome message notice the dtml-lvar call instead dtml-var --> <a href="<dtml-lvar mainpage url>"><dtml-lvar mainlinktext></a> <!-- mainpage being the document you want to link to and mainlinktext the text for the link --> <dtml-var footer> <!-- your standard header --> ---- Now lets walk trough this example. In en/welcome is the following (between the ----): ---- Welcome to my page. ---- In en/mainpage is some document with images, text forms, whatever. In en/mainlinktext is (content between ----): ---- Go to main page. ---- What happens if someone with english prefs set in browser visits you page ? Easy: dtml-lvar calls get expanded to <language>/<variable content> instead of <variable content> like a dtml-var would do: ---------- <..... header ....> <h1>Welcome to my page</h1> <a href="en/mainpage">Go to main page.</a> <.... footer ....> ----------- No if someone from France with fr prefs set in the browser the link would change to fr/mainpage and all text would be taken from the french versions. It is extremely powerful. The language directories can contain any kind of object you can put in a folder - they are nothing special. Only the translator is nessecary since it provides the dmtl-lvar method. We have already created a german/english website using a bunch of squishdots, metapublishers and whatnot without having big trouble. We had to change a couple of products to use dtml-lvar instead of static text, but apart from that .... - Holger Am Donnerstag, 2. November 2000 11:21 schrieb Petr van Blokland:
Lee Hunter wrote:
I was wondering if anyone here has used Zope to create bilingual/multi-lingual/localised websites.
I've done a number of bilingual (French and English) projects in recent years using plain old html where the two language versions had to be kept mostly symmetrical and its been a bit of a pain as the site grows to keep the two versions in synch and make sure the translations are done on time etc.
Its seems that Zope might help manage these kinds of projects - by smoothing the workflow - tracking what needs translation, perhaps sending stuff to the translator automatically, reporting on what's been done by who and comparing the two language versions to make sure they are parallel. And perhaps even sharing a common architecture - so that you didn't need two sets of DTML methods etc.
I'm wondering if this fits into other generic Zope workflow products that people have talked about developing or if it would have to be built from scratch.
Anyone have thoughts on this subject?
Yes. Look at our bilingual site at http://www.petr.com In the url: http://z.petr.com/buro/p/index_html?language=en the parameter 'language' is available in the whole object tree. Only text modules need to know how to react on this parameter. Pages, images, navigation, templates etc. are not aware of the language (though they may if needed, e.g. changing the layout) So there in only one tree of pages, one set of navigation. The text modules have syntax like:
<dtml-if "getform('language') == 'nl'">De kracht van het werken met klein team... <dtml-else>The strength of working with a small team... </dtml-if>
Pages only contain references to text modules and the name of a template to be used.
Kind regards, Petr van Blokland buro@petr.com
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
-- ----------------------------------- catWorkX GmbH Hamburg Dipl.-Ing. Holger Lehmann Stresemannstr. 364 22761 Hamburg Tel: +49 40 890 646-0 Fax: +49 40 890 646-66 mailto:lehmann@catworkx.de http://www.catworkx.de http://www.catbridge.de