nuxeo-localizer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nuxeo-localizer] Localizer only works for western languages (iso-88


From: Juan David Ibáñez Palomar
Subject: Re: [Nuxeo-localizer] Localizer only works for western languages (iso-8859-1)
Date: Mon, 25 Mar 2002 17:40:54 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020320

Hi Antonio,

Thank you very much for the report and the patch.

I haven't made any effort to properly support charsets
and encodings, yet. I planned to work on this for the
0.10 release, but it can be done before if you need it
and can contribute.

Implementing the whole thing is a lot of work, I think
the following things should be done:

- internally both LocalPropertyManager and MessageCatalog
  store normal Python strings, they only should store
  unicode strings. An upgrade path should be provided.

- the encoding of the PO files should be UTF-8.

- implement charset and encoding negotiation, that is,
  look at the Accept-Charset and Accept-Encoding headers
  in the the request and return to the client the page in
  the right encoding, do something similar to get data from
  POST requests.

But perhaps this is too much work and is better to wait for
Zope 2.6, which will include the Toby Dickenson's patches that
provide unicode support to Zope. This is probably the approach
I'll take, unless you or somebody else volunteers to contribute.

In the short term I would apply your first proposed solution,
at least to get the ZMI working. Unfortunately I don't have time
now :-(

If you want to commit it yourself I can give you write access
to the CVS, then just create a branch and commit your changes
there. I would merge it with the main branch for the next release.

I'm sorry I can't do anything else now :-(



address@hidden wrote:

Hi all!
I'm working with i18n and therefore I've downloaded and installed Localizer 
which seems to be the best product for Zope in this area, thanks.

During my evaluation of the product I've found serious problems when handling 
languages that are not ISO-8859-1 (western languages).

I made some testing with the tutorial that comes together with Localizer. I added bulgarian as a language to a LocalContent. Then I added a title in bulgarian for the first chapter and saved the changes, after that the form was BROKEN ... the html-form was not correct anymore and buttons were missing, I could not even remove the bulgarian text I added. This depends on the charset used in the header of the form. Localizer uses manage_page_header, which set ISO-8859-1 as charset. When using multiple language forms we have to use UTF-8.
So what I did to get it work is putting the following two lines in the file 
ui/LPM_properties.dtml

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<dtml-call "RESPONSE.setHeader('Content-Type','text/html; charset=UTF-8')">
<title><dtml-var title_or_id></title>
<link rel="stylesheet" type="text/css" href="/manage_page_style.css">
</head>
<body>
...

This header should also be added when viewing the LocalContent so I had to do 
the same for standard_html_header.

Another solution is to avoid having multiple languages in the same form and instead have a specific form for each language using the proper language ISO-charset. In order to get this solution works fine we have to change the UI of the Local Property Manager. Instead of having the properties in horisontal tabs we can have the languages added and then for each language have all properties of the LocalContent in the same page. This gives us the possibility to mantain the language-specific charset.
Anyway I prefer to go for a full unicode support in Localizer. That means all 
forms should have UTF-8 as charset encoding. But if possible both solutions 
would be better.

Maybe even the .po files should be in UTF-8 ... anyway I haven't looked further 
into this yet ...

What do you think about the proposed solutions?
Any other solutions out there?

Thanks in advance,
Antonio De Marinis
IT-consultant
EEA.EU.INT

_________________________________________s_p_r_a_y_
Här börjar Internet!
Skaffa gratis e-mail och gratis Internet på http://www.spray.se

Anmäl ditt intresse för Spray ADSL bredband! http://www.spray.se/adsl/intresse


_______________________________________________
Nuxeo-localizer mailing list
address@hidden
http://mail.freesoftware.fsf.org/mailman/listinfo/nuxeo-localizer



--
J. David Ibáñez, Nuxeo.com
Python programmer (http://www.python.org)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]