Re: [Zope-dev] Re: [Zope] Multi-lingual sites and workflow
Hi Petr, Am Donnerstag, 2. November 2000 14:49 schrieb Petr van Blokland:
Holger, thanks for the reply. Some questions: - Where is the Translator product avalaible.
Please visit http://www.zope.org/Members/fog/Translator
- What is I want to change from one language page to the same page with a different language. I don't want to change the settings in the browser for it.
Translator supports the standard browser settings as well as a cookie based version. It comes with a fully fledged demo that demonstrates this cookie stuff. For me it was cut, copy and paste from there on :-) Make sure you check out www.vitaminic.com to see how it feels like :-) They did their site using Zope and Translator with cookies.
- It seems that you have different folders per language containing all things for that language. That is not what we want. I want to have one folder structure where the different language versions of a text a in the same document or folder.
Sorry, no way :-( But let me see if I can argue with you :-) Yes, you can put it all in one directory and into on document. But, just imagine this: You have the "templates" in you main directory and only (!) a bunch of DTML-Methods located in the subfolders en,de,nl,fr,es and so on. These DTML-Methods only return a simple String or a small part of your document translated properly. This enables you to choose different images for different languages for example. Furthermore you can "give" someone a copy of your default language folder and as him/her to translate it. This can be done in parallel without people having the need to change the original templates. Now if you do not like all the DMLT-Methods, you can simple create a e.g. en folder and use properties attached to that folder to hold your translations. If you do not like to have folders flying around, you can create them *inside* the translator. But please notice, you cannot have them outside as well as inside, the inside ones will always be the ones used, Translator will not seek any other folders once he found one. The translator itself has another way of storing translated text. It is accesible on the Translate tab inside the translator. IMHO the translator has a very clumsy interface there so I never used it. But it might be cool as well, since you could be able to export this data as XML and reimport it once it is translated. Anyway, whatever you do make shure you check it out and give yourself a day to waste on the translator to find out all possiple ways to play around. I had a lot of fun with it up to now and it works absolutely reliably. Even the highest educated people in our company think this product is well designed to support multi lingual features so easily (apart from a fwe enhancements they would like to see :-))) ) - Holger
Petr
Holger Lehmann wrote:
Guys, please !
-------snipp------- -- ----------------------------------- 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
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
participants (2)
-
Holger Lehmann -
Petr van Blokland