ITS

From OkapiWiki

Jump to: navigation, search

Contents

Overview

The Internationalization Tag set (ITS) is a W3C recommendation that defines a set of elements and attributes you can use to specify different internationalization- and localization-related aspects of your XML document, for instance: ITS defines what attribute values are translatable, what element content should be protected, what element should be treated as a nested sub-flow of text, and much more.

Default Rules

By default the filter process the XML documents based on the ITS defaults. That is:

To modify this behavior you need to associate the document with ITS rules. This can be done different ways:

When processing a document, the filter...

  1. Assumes that all element content is translatable, and none of the attribute values are translatable.
  2. Applies the global rules found in the (optional) parameters file associated with the input document.
  3. Applies the global rules found in the document.
  4. And finally, applies the local rules within the document.

Example

For example, assuming that ITSForDoc.xml is the ITS file associated with the input file Document.xml, the translatable text is listed below.

ITSForDoc.xml:

<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
 <its:translateRule selector="//head" translate="no"/>
 <its:withinTextRule selector="//b|//code|//img" withinText="yes"/>
</its:rules>

Document.xml:

<doc>
 <head>
  <update>2009-03-21</update>
  <author>Mirabelle McIntosh</author>
 </head>
 <body>
  <p>Paragraph with <img ref="eg.png"/> and <b>bolded text</b>.</p>
  <p>Paragraph with <code>data codes</code> and text.</p>
 </body>
</doc>

The resulting text units are (with the inline codes in XLIFF 1.2 notation):

1: "Paragraph with <x id='1'> and <g id='2'>bolded text</g>."
2: "Paragraph with <g id='1'><x id='2'/></g> and text."

Validation

The Relaxed project includes an online validator for ITS.

Relaxed is an open-source project hosted on SourceForge

Extensions

Several extensions have been defined by the ITS Interest Group. There are listed in the Issues and Proposed Features section of the Interest Group wiki.

The extension namespace is http://www.w3.org/2008/12/its-extensions

ITS in the Okapi Framework

The Okapi Framework uses ITS in several places. For example:

For an overview of the components with ITS capability, see the ITS Components page.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox