[Zope-CMF] Multiple languages

Juan David Ib??ez Palomar jdavid@nuxeo.com
Fri, 17 May 2002 12:34:20 +0200


Frank Bennett wrote:
> Not a problem specific to the CMF, with apologies.
> 
> I am trying to set up simple language switching in Zope. I tried out the
> Localizer, but found it added a layer of complication without fully solving
> the problem for us (the LocalContent object in Localizer is apparently limited
> to structured text).
> 

LocalContent is not limited to strucutured text, it's just text, it's
up to you how to interpret this text.


> My immediate need is for a small site.  We only need to support two languages,
> and we are willing to maintain two trees of complete page templates, if we
> have to.  Connecting users should be fed a page that suits their preference of
> languages in the first instance, and they should be able to change languages
> using buttons in the page.
> 

To maintain separate trees for each language is a bad idea, you will
need a lot of time to keep them in sync. However, if you want to do
it this way you can use LocalFolder, it's not intended to be used this
way, but you can do it.

With a Localizer instance in the root of your web site you will be able
to customize easily your language negotiation policy, for example using
the user preferences.


> I have put together code for setting and reading cookies and whatnot, but I
> cannot for the life of me figure out how to use that information to jump to or
> feed out a page template other than the one that the browser was originally
> pointed at.
> 
> If anyone can point me at worked examples, I would be very grateful.
> 


Sincerily, you're going to save a lot of time if you use Localizer.

I suggest to use the CVS version.

The problem right now with Localizer is that the documentation is
a bit outdated and have some design flaws. To rewrite it is the only
thing that remains to do to release the 0.9.0 version.

But you know there's a mailing list where all your questions will
be solved.



> (If this belongs somewhere else, please let me know.)
> 
> Frank Bennett
> Nagoya 
> 
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
> 
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature requests
>