ITS 1.0 helps to express information about internationalization and localization. Below is an example of an DocBook document to which the ITS 1.0 Translate data category can be applied. This data category helps to specify what parts of a document should be translated or not.
<dbk:article
xmlns:its="http://www.w3.org/2005/11/its"
xmlns:dbk="http://docbook.org/ns/docbook"
its:version="1.0" version="5.0" xml:lang="en">
<dbk:info>
<dbk:title>An example article</dbk:title>
<dbk:author
its:translate="no">
<dbk:personname>
<dbk:firstname>John</dbk:firstname>
<dbk:surname>Doe</dbk:surname>
</dbk:personname>
<dbk:affiliation>
<dbk:address>
<dbk:email>foo@example.com</dbk:email>
</dbk:address>
</dbk:affiliation>
</dbk:author>
</dbk:info>
<dbk:para>This is a short article.</dbk:para>
</dbk:article>
There are two ways to express ITS 1.0:
locally
and
globally. The
its:translate
attribute expresses locally that the content of the
<dbk:personname>
element should not be translated. Alternatively an ITS 1.0
<its:translateRule>
element within an
<its:rules>
element (see below) can be used globally for the same purpose, but not bound to a single
target document.
<its:rules version="1.0" xmlns:its="http://www.w3.org/2005/11/its"
xmlns:dbk="http://docbook.org/ns/docbook">
<its:translateRule selector="//dbk:personame" translate="no"/>
</its:rules>
This information can be used to create various output, e.g. pseudo translated text.
<dbk:article xmlns:its="http://www.w3.org/2005/11/its" xmlns:dbk="http://docbook.org/ns/docbook" its:version="1.0" version="5.0" xml:lang="en"> <dbk:info> <dbk:title>Xx xxxxxxx xxxxxxx</dbk:title> <dbk:author its:translate="no"> <dbk:personname> <dbk:firstname>John</dbk:firstname> <dbk:surname>Doe</dbk:surname> </dbk:personname> <dbk:affiliation> <dbk:address> <dbk:email>foo@example.com</dbk:email> </dbk:address> </dbk:affiliation> </dbk:author> </dbk:info> <dbk:para>Xxxx xx x xxxxx xxxxxxx.</dbk:para> </dbk:article>
Another kind of output could be an XLIFF document which contains translatable text.
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:okp="okapi-framework:xliff-extensions" version="1.2"> <file original="\8CA58EB08B03802.xml" source-language="en" target-language="fr" datatype="xml" okp:settings="okf_xml" okp:encoding="utf-8"> <header> <tool tool-id="-1060499962" tool-name="WebUtilities.WebSet" tool-version="1.0.2.0" /> </header> <body> <trans-unit id="1"> <source xml:lang="en">An example article</source> <target xml:lang="fr">An example article</target> </trans-unit> <trans-unit id="2"> <source xml:lang="en">This is a short article.</source> <target xml:lang="fr">This is a short article.</target> </trans-unit> </body> </file> </xliff>
Both outputs have been generated using the ITS test page from Enlaso.
$Id: simple-example.html,v 1.3 2008/03/22 00:20:17 fsasaki Exp $
Copyright (c) 2002-2007 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply. Your interactions with this site are in accordance with our public and Member privacy statements.