[Zope3-dev] Re: ZCML

Martijn Faassen faassen at vet.uu.nl
Wed Aug 20 15:40:52 EDT 2003


Fred L. Drake, Jr. wrote:
> The question, then, is whether message ids with default text should be
> viewed as something other than a simple string.  Most I18N support
> tools go to great lengths to hide the difference, for better or
> worse.

That's an interesting consideration which just gave me an idea.

Imagine all human-readable text (which happens to be all text that needs 
to be i18n-ed) were not stored as an attribute, but as text node inside
the element, like this:

<menu>Text</menu>

We could introduce a pattern in our schema saying that at all places
element text occurs, it can be replaced with an i18n-ed element text:

<menu><i18n msg_id="foo">Text</i18n></menu>

So, if we had a pattern where all human readable text is element
content (and non-human readable text is in attributes), this pattern
could be employed. It is very similar to the way the _() pattern works
in Python.

That's a neat demonstration of the usefulness of the human-readable text
not in attributes pattern.

Regards,

Martijn




More information about the Zope3-dev mailing list