Re: getFormatter

Vladislav Vorobiev <[email protected]>
Newsgroups gmane.comp.web.zope.german
Message-ID <[email protected]>
>> Ich nutze das, allerdings auf Zope2.12.
>Was heißt denn, dass es nicht funktioniert?

Kann mich nur anschließen. Wie sieht die Fehlermeldung aus?

Probier mal:

context.REQUEST.locale.dates.getFormatter('dateTime', 'medium')



Am 23.02.11 schrieb [email protected] <[email protected]>:
>
> Nochmal im Zusammenhang ;-)
>
>> Ich nutze das, allerdings auf Zope2.12. Was heißt denn, dass es nicht
>> funktioniert?
>
> Ich bekomme einen AttributeError wenn ich auf locales zugreifen will.
>
>
>> Eventuell musst Du configure.zcml aus zope.i18n[.locales] einbinden.
>
> Wie funktioniert denn das mit dem einbinden? Ich habe es mit der folgenden
> Zeile in site.zcml probiert:
>
>  <include package="zope.i18n.locales" files="configure.zcml" />
>
> aber das war es wohl nicht....
>
> [email protected] wrote on 02/22/2011 03:09:31 PM:
>
>> >
>> > Ich hatte gehofft, dass ich jetzt in einem Page Template genauso wie in
>> > Zope 3 folgendes benutzen könnte:
>> >
>> > python:request.locale.dates.getFormatter('dateTime')
>> >
>> > Aber das funktioniert leider nicht. Ich muss gestehen dass ich den
>> > letzten Teil der Bemerkung in den Release Notes nicht verstehe,
>> > vielleicht liegt es daran.


-- 
Best Regards
Vlad Vorobiev


_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.