- From: Klotz, Leigh <Leigh.Klotz@pahv.xerox.com>
- Date: Fri, 6 Feb 2004 12:29:42 -0800
- To: "'azydron@xml-intl.com'" <azydron@xml-intl.com>
- Cc: "'www-forms@w3c.org'" <www-forms@w3c.org>
The primary means for localization that we put into XForms is based on external instance data and the HTTP "Accept-Lang" header. For example (namespaces omitted) <head> <model> <instance src="my-data.xml" /> <instance src="labels.xml" id="labels" /> ... </model> </head> <body> <input ref="cc/expiry"><label ref="instance('labels')/expiry" /></input> ... </body> Assume that the my-data.xml XML tree looks like this: <order> <cc> <number/> <expiry/> <name/> <type/> </cc> ... </order> The labels.xml tree that comes back from the server will depend on what data the server chooses to provide. It can look at the "Accept-Lang" header in the HTTP request to determine what actual resource (file) on the server side to use. For example, for en-US it might look like this <labels> <expiry>Expiration Date</expiry> ... </labels> and for en-CA it might look like this <labels> <expiry>Expiry Date</expiry> ... </labels> and for fr it might look like this: <labels> <expiry>Date d'échéance</expiry> ... </labels> A sprinkling of xml:lang attributes in the server files might help a server sort out exactly what XML to return in response to the labels.xml query, but in my experience translations are often produced by different individuals so combining the language strings into one file doesn't help matters. If you choose do to so however, you might combine the data together like this: <labels> <expiry xml:lang="en-US">Expiration Date</expiry> <expiry xml:lang="en-CA">Expiry Date</expiry> <expiry xml:lang="fr">Date d'échéance</expiry> ... </labels> and then write a server-side expression that uses the following XPath expression in server-side XSLT to return only the labels matching the Accept-Lang header: /*[xml:lang=$acceptLang] A more complicated XPath and XSLT template could return all of the matching languages, in order of preference, and the XForms first-node rule would return the first matching value in the <label ref=...> expression in the form, and that would take care of the case where labels are not fully translated, so there would be a fallback. Leigh. -----Original Message----- From: T. V. Raman [mailto:tvraman@us.ibm.com] Sent: Friday, February 06, 2004 11:40 AM To: azydron@xml-intl.com Cc: www-forms@w3c.org Subject: XForms localization not that I am aware of --- I think we conciously (or perhaps unconciously) put anything that is likely to get rendered to the user as element content and used attributes exclusively for "qualifying" things e.g., appearance for controls, styling, binding etc etc >>>>> "Andrzej" == Andrzej Zydron <azydron@xml-intl.com> writes: Andrzej> Hi, Andrzej> Andrzej> I am a member of the OASIS XLIFF (XML Localization Andrzej> File Format) TC. I have been charged with Andrzej> investigating the localization issues regarding Andrzej> XForms. I have a fairly good grasp of the XForms Andrzej> elements that contain text data: Andrzej> Andrzej> <label> <hint> <help> <alert> <value> <message> Andrzej> <setvalue> Andrzej> Andrzej> Are there any XForm attributes that could contain Andrzej> translatable text? Andrzej> Andrzej> Thanks in advance, Andrzej> Andrzej> AZ Andrzej> Andrzej> Andrzej> -- Andrzej> Andrzej> Andrzej> email - azydron@xml-intl.com smail - Mr. A.Zydron 24 Andrzej> Maybrook Gardens, High Wycombe, Bucks HP13 6PJ Andrzej> Mobile +(44) 7966 477181 FAX +(44) 870 831 8868 www Andrzej> - http://www.xml-intl.com Andrzej> Andrzej> This message contains confidential information and Andrzej> is intended only for the individual named. If you Andrzej> are not the named addressee you may not disseminate, Andrzej> distribute or copy this e-mail. Please notify the Andrzej> sender immediately by e-mail if you have received Andrzej> this e-mail by mistake and delete this e-mail from Andrzej> your system. E-mail transmission cannot be Andrzej> guaranteed to be secure or error-free as information Andrzej> could be intercepted, corrupted, lost, destroyed, Andrzej> arrive late or incomplete, or contain viruses. The Andrzej> sender therefore does not accept liability for any Andrzej> errors or omissions in the contents of this message Andrzej> which arise as a result of e-mail transmission. If Andrzej> verification is required please request a hard-copy Andrzej> version. Unless explicitly stated otherwise this Andrzej> message is provided for informational purposes only Andrzej> and should not be construed as a solicitation or Andrzej> offer. Andrzej> Andrzej> -- Best Regards, --raman ------------------------------------------------------------ T. V. Raman: PhD (Cornell University) IBM Research: Human Language Technologies Architect: Conversational And Multimodal WWW Standards Phone: 1 (408) 927 2608 T-Line 457-2608 Fax: 1 (408) 927 3012 Cell: 1 650 799 5724 Email: tvraman@us.ibm.com WWW: http://almaden.ibm.com/u/tvraman AIM: TVRaman GPG: http://www.almaden.ibm.com/cs/people/tvraman/raman-almaden.asc Snail: IBM Almaden Research Center, 650 Harry Road San Jose 95120
Received on Friday, 6 February 2004 15:27:54 UTC