nuxeo-localizer
[Top][All Lists]
Advanced

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

Re: [Nuxeo-localizer] Localizer, DTML and gettext


From: Joachim Werner
Subject: Re: [Nuxeo-localizer] Localizer, DTML and gettext
Date: Fri, 21 Feb 2003 03:09:19 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.2.1) Gecko/20021130

Andy McKay schrieb:
Hi there,

I just started to use Localizer in an old project that was previously using ZBabel. From what I understand from the docs I should be able to:

- add a Localizer to my Zope instance

- then do <dtml-gettext>Foo</dtml-gettext>

this gives the error:

# Module Products.Localizer.GettextTag, line 98, in __call__
KeyError: gettext

- or <dtml-var "gettext('Foo')">

this gives the error:

# Module DocumentTemplate.DT_Util, line 201, in eval
__traceback_info__: gettext
# Module <string>, line 2, in f
NameError: global name 'gettext' is not defined

So I'm guessing there's some kind of error injecting the name gettext into the namespace.

Am I just using Localizer in the wrong manner here? Basically Im wanting to localize strings inside DTML objects and get onto better ways of doing this later.

Localizer 1.0.0 (tried 0.9.2 as well)
Zope 2.6.0
Python 2.1.3

Thanks

Hi!

Either rename your message catalog to "gettext" or pass the name of the catalog using "<dtml-gettext catalog="NameOfCatalog">String to translate</dtml-gettext>.

P.S.: I've just written a prototype of a BabelToLocalizer product that uses Localizer as the backend, but lets you keep the ZBabel syntax (self.translate() from Python and the babel and fish tags). Do you think this would be useful for a public release?



--

iuveno AG

Joachim Werner

_________________

Wittelsbacherstr. 23b
90475 Nürnberg

address@hidden
www.iuveno.de

Tel.: +49 (0) 911/ 9 88 39 84





reply via email to

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