[Zope] Zope and Japanese (was [Zope] Confera FAQ?)

TFE MMS JARVIS JOHN jarvis.sd082@ex.tel.co.jp
Wed, 11 Aug 1999 15:29:42 +0900


Hi.

I've been using Zope on internal projects for a while now. The
application requirements include running in Japanese and 
English depending on the user's browser or language preference
setting.

Brian mentions EUC and SJIS issues which I hadn't paid much
attention to until it bit me when I went to implement a document
filing system using PostgreSQL which apparently only handles EUC.
I ended up having to set all of my pages character sets to EUC
which is a major headache because our Oracle server uses
SJIS (which can be set using NLS_LANG). I now have a
whole bunch of content that I have to convert to EUC.
My advice: follow Brian's advice.

I would be very interested in patches and whatever.

Also, it was discussed on the list a while back but I haven't 
heard anything since. Has anyone done anything for multilingual
sites? I've been thinking a lot about some sort of system for
automatic content selection based on language but have yet
to come up with anything coherent. 

What I am using now is DTML Documents with DTML that looks 
up appropriate strings stored in the properties as lists. It feels like a 
kludge but I think that's just because the usage is reverse that of
normal--main content goes in the properties with only a lookup script
in the Document.
It works well because a most of the content is generated 
from databases that have multilingual content. It also presents a
nice way to manage the strings and assures that all of my buttons,
captions, etc. all use the same wording. It only works for
one-line strings but I figure that larger blocks of pure content
are better stored in their own DTMLDocuments anyway.

BTW. I had to add 'jst':'Japan' to _zmap in DateTime.py to get date things
to work.
I think you can check this by:

$ python
Python 1.5.1 (#1, Sep  3 1998, 22:51:17)  [GCC 2.7.2.3] on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import time
>>> time.tzname[0]
'JST'
>>>

-John (cronic lurkaholic)

> -----Original Message-----
> From:	Brian Hooper [SMTP:brian@garage.co.jp]
> Sent:	Wednesday, August 11, 1999 12:36 PM
> To:	Itai Tavor
> Cc:	zope@zope.org
> Subject:	Re: [Zope] Zope and Japanese (was [Zope] Confera FAQ?)
> 
> Hi Itai!
> 
> This is Brian Hooper at Digital Garage.  I worked on SonicNet Japan
> with Jay.
> 
> > I'm about to start work on some Japanese sites. Can you tell me if 
> > you ran into any problems mixing Zope and Japanese?
> 
> Not really - there are a few small issues with character encoding.
> 
> You should use EUC for everything, if possible; Python doesn't work
> properly with Shift-JIS without patching and rebuilding Python (these
> patches are not official, I think someone contributed patches to make
> Python safe with SJIS).
> 
> I think depending on your machine and OS environment you may have to add
> a timezone mapping or two to DateTime.py, also.  And in order to send
> out 7-bit JIS mail using MailHost, that has to be patched as well.  If
> you're interested, maybe we could share patches :-) .
> 
> --Brian
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
> 
> (To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
> 
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )