[Zope-PTK] Translation of PTK

Tres Seaver tseaver@digicool.com
Wed, 29 Nov 2000 21:53:14 -0500


robert wrote:

> Is there a provision to translate PTK to other languages?
> I am very keen to do a German translation, but it seems that
> lots of strings that are displayed are hardcoded.

Much of the displayed text is generated by DTML methods which
are copied to the portal instance at creation (or "interface
refresh").  You could start by editing these objects.  If you
do so, please bundle them into a separate folder, export it,
upload it to www.zope.org, and link to it from:

  http://www.zope.org/Products/PTK/ZWiki/ContributedPTKProducts

Other text comes from:

 * DTML Methods of Control_Panel.Products.DemoPortal ZClasses.

   Here, I would create a new product (e.g., 'DeutschPortal')
   and subclass each of the ZClasses, replacing the English.

 * DTML on the filesystem (e.g., for Document/Image/File/Link/
   NewsItem view/edit).

   Here, again, the most straightforward approach is to derive
   new ZClasses from the bases (in 'DeutschPortal' again),
   replacing the views again.

 * English text in Python code (e.g., the 'listActions()' methods
   of the content objects).

   These methods should be overridable with Python methods (in
   'DeutschPortal').

The downside to this approach is that your new product will need
to be resynched with newer versions of DemoPortal;  on the other
hand, it does leave you with a clearer point of control for
laying out the site as you would like.

A more elegant solution, anyone?

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org