[Y-devel] comment: XML interface description
Peter Prohaska pitrp at wg78.de
Wed Feb 25 20:07:39 GMT 2004
On Wed, Feb 25, 2004 at 07:23:11PM +0100, Rupert Mazzucco wrote:
> While I understand that the XML fragment on p. 51 serves
> only as illustration, I want to point out a flaw with the
> design of this piece:
>
> In the light of possible internationalisation, text should
> probably never be hardcoded into the widget description, but
> always via a message catalog that can then be changed according
> to the desired language. (Same goes for attached sound bits.)
>
> Maybe like
>
> <y:interface>
> <y:gobjects>
> ...
> <y:label id="2" message="1" />
This is not very much in the spirit of xml because a human would not
get the idea very easy.
Regarding internationalisation...
(1) As long as you use i.e. english as the primary catalog language you will
have no problems with encoding the message as attribute unless you want
to use xml special chars.
(2) If (1) is not sufficient, you should probably use:
(a) if id can be encoded as attribute:
<y:label id="xyz">
<y:message xml:lang="en">Spam and Eggs</message>
<y:message xml:lang="xx_YY>some utf-8 or whatever encoding you use</message>
</y:message>
(b) if id cannot be encoded as attribute and with seperate catalog:
<y:label>
<y:reference-message xml:lang="aa">default</y:message>
</y:label>
<y:message-catalog xml:lang="bb">
<y:reference-message>default</y:message>
<y:message>...</y:message>
...
</y:message-catalog>
> ...
> </y:gobjects>
> <y:message_catalog lang="C">
Not sure, but I think that the xml:lang attribute shoud be used and that
"lang=C" should just be the default message which is already provided
above.
Am I wrong about the meaning of "C" as locale?
regards,
peter.
More information about the Y-devel mailing list
2026 © www.Y-Windows.Org - All Rights Reserved