[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML and Internationalization...

  • From: Deke Smith <deke@t...>
  • To: "Sebastien Sahuc" <ssahuc@n...>,<xml-dev@i...>
  • Date: Mon, 9 Nov 98 08:30:15 -0600

xml lang spanish
Sebastien Sahuc, ssahuc@n... said on 11/9/98 4:57 AM:

>Hi there,
>
>I wonder if there is any specifications available in making XML documents
>multilingual.
>
>For instance, I have a xml document that specifies some operations available
>to the user (the selection of the operation to call is done through a GUI).
>As a small description is associated to each operation, it should be useful
>to give the user this description in the custom language.
>
>My first thought will be the following:
>...
><method id="fact">
>
>    <description lang="english">The factorial method</description>
>    <description lang="french">La méthode factorielle</description>
>    <description lang="spanish">La operacíon factorial</description>
>
>    <param id="Nbr" mode="in" type="int">
>        <description lang="english">The number to pass in</description>
>        <description lang="french">Le nombre à passer</description>
>        <description lang="spanish">El número a calcular</description>
>    </param>
>
></method>
>...
>
>Does anybody has a suggestion auround the syntax ? Any comment would be
>greatly appreciate.
>

I would suggest one change to your syntax: there is a standard tag for language specification in XML. That tag is "xml:lang" and it uses ISO 639 language codes. You can find the language codes at < http://www.isoc.org:8080/langues/iso639.fr.htm>.

Your sample would look like:

...
<method id="fact">

    <description xml:lang ="en">The factorial method</description>
    <description xml:lang ="fr">La méthode factorielle</description>
    <description xml:lang ="es">La operacíon factorial</description>

    <param id="Nbr" mode="in" type="int">
        <description xml:lang ="en">The number to pass in</description>
        <description xml:lang ="fr">Le nombre à passer</description>
        <description xml:lang ="es">El número a calcular</description>
    </param>

</method>
...

In the XML spec it talks a little bit more about language specification:
<http://www.w3.org/TR/1998/REC-xml-19980210#sec-lang-tag>

A MUCH more complicated translation format can be found from LISA at:
<http://www.lisa.org/tmx/index.html>. This may or may not be overkill for what you are doing.


Deke


-----------------------------------------------------------------
Deke Smith
Tallent Communications Group, Brentwood TN
deke@t..., 615-661-9878
-----------------------------------------------------------------
" The best way to predict the future is to invent it. "
       - Alan Kay



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.