[Zope-CMF] Multilingual site with CMF/Plone?

Greg Ward gward@python.net
Mon, 10 Feb 2003 14:28:26 -0500


Has anyone had much luck creating multilingual content with the CMF,
specifically with Plone?  (I've already asked on the plone-users list,
and didn't get any helpful responses.)  I've been steeping myself in
products, types, source code, and even some documentation in an attempt
to get a handle on how to do it.  The only indication I've seen that
anyone has had any success at this is Rainer Thaden's LocCMFProduct and
related howto:

  http://cmf.zope.org/Members/rthaden/LocCMFProduct/LocCMFProductHowTo/view

This product provides two classes, Employee and Project; as I understand
it, the idea is that people enter information about themselves and their
projects in multiple languages, and the appropriate language is selected
at run-time with some help from the Localizer product.  Of course this
isn't exactly what I want, but it's a good starting point;
unfortunately, I'm unable to get Rainer's code working, so it's not
quite ideal.  Here's what I've done so far:

  * in the ZMI, I managed to add CMF types "Employee" and "Project" to
    /cp/portal_types (/cp is my test CMF portal) using the
    "Factory-based Type Information" option

  * in the root of my CMF portal, "Employee" and "Project" now show
    up when I hit the "New" button -- good.  So I added a new
    employee.

  * unfortunately, when I try to *do* anything with the new Employee
    object, it fails -- eg. viewing fails with this traceback:

      Traceback (innermost last):
        Module ZPublisher.Publish, line 98, in publish
        Module ZPublisher.mapply, line 88, in mapply
        Module ZPublisher.Publish, line 39, in call_object
        Module Products.CMFDefault.SkinnedFolder, line 77, in __call__
        Module Products.CMFCore.utils, line 156, in _getViewFor
        Module OFS.Traversable, line 158, in restrictedTraverse
        Module OFS.Traversable, line 143, in unrestrictedTraverse
         - __traceback_info__: ([], 'Employee_view')
        Module OFS.ObjectManager, line 652, in __getitem__
      KeyError: Employee_view

'Employee_view' appears in three places:

  * in the ZMI, at /cp/portal_types/Employee, under the "Actions" tab,
    the action for "view" is 'Employee_view'

  * in the product source code, it's mentioned in the
    'factory_type_information' dictionary -- presumably this is the
    source for the sighting in the ZMI

  * in the filesystem, at Products/LocCMFProduct/skins/LocCMFProduct,
    is a file Employee_view.pt

So apparently Zope is unable to make the connection between the action
'Employee_view' and the file 'skins/LocCMFProduct/Employee_view.ht'.
Arghh.  Anyone have any advice?

Also, general advice on how to build a multi-lingual CMF/Plone site
would be most welcome.  I'm groping for clues here, folks...

Thanks!

        Greg
-- 
Greg Ward <gward@python.net>                         http://www.gerg.ca/
Vote anarchist.