On Wednesday 31 May 2006 04:29, Chris Withers wrote:
> - Can my existing .pot and .po files be used?

Yes, the PO file format is totally independent of Zope and Python.

> - Are ZPT's marked up in the same way as they were in Zope 2?

The Zope 2 people backported the Zope 3 code, so yes. :-)

> - How would I mark up constant and computers strings in zodb-based
> Python Scripts?

That issue has not been addressed at all, since we are not supporting TTW 

> - Same question for External Methods.

This is Python code; Zope 3 provides a customized pygettext implementation to 
extract Python message strings.

> - How do I ask the translation service what the currently negotiated
> language is?

Zope 3 does not have a translation service. It is also not of the translation 
utility's concern to know about the negotiated language. There are other 
interfaces for this; I believe ILanguageNegotiator.

> - How do I ask the translation service what all the available languages
> are for a particular domain?

I do not think there is an API for that, but you could certainly develop one.

> - How do a write/register a negotiator that choose a language based on
> an attribute of the user object and then falls back to normal browser
> negotiation if that attribute isn't present?

Just implement the right interface and register it. This is not too hard and I 
think there are code examples out there.

> - How do I generate .pot files from ZPTs, Python Scipts and External
> Methods? I used to use PTS' .missing functionality and just spider the
> whole app. Is something similar available in Zope 2.9/3 land?

In Zope 3 you can simply call utilities/i18nextract.py; it will extract all 
message strings from Python, ZPT and ZCML files.

Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
Zope3-users mailing list

Reply via email to