durusmail: quixote-users: Quixote and gettext()
Quixote and gettext()
2004-10-06
2004-10-06
2004-10-06
Quixote and gettext()
Jim Dukarm
2004-10-06
On Tuesday 05 October 2004 23:25, Holger Schurig wrote:
> Seems that python's _ method (the builtin one, via the install() method)
> is only for strings, but in the second case the "Hello" is no longer a
> string.
>
> What is your method to i10n/i18n Quixote Applications?

Right now I am converting my Quixote application for multi-lingual use.  My
solution to the problem that you mention is to avoid using PTL templates.  I
have a base page class that accumulates all the contents of each page as
Unicode and sets the response content-type header to 'text/html;
charset=utf8'.  The metas and XHTML doctype etc. at the top of the page
declare the page's language and utf8 encoding in the appropriate places.

Instead of GNU gettext, I am using a very similar method, which involves
loading translated text as Unicode from a UTF8-encoded text file.

My application uses the old quixote form package, and I am not yet sure how
much I will have to hack that to make it Unicode compatible.

I think Neil Schemenauer is working in his 'spare time' on making PTL and
other parts of Quixote Unicode-compatible.  He may have some unreleased code
working that would help you.

mit Freundlichen Gruessen

Jim Dukarm
DELTA-X RESEARCH INC
Victoria BC Canada

reply