Its0512LocProperties

From W3C Wiki


ITS WG Collaborative editing page

Follow the conventions for editing this page.

Status: Initial Draft ie. please focus on technical content, rather than wordsmithing at this stage.

Author: Christian Lieske

FS-''' This is the initial upload of a mail from Christian. Everybody, please comment! '''

Localization Properties

Question

What do the terms 'localization directive' and 'localization property' mean, and how are they related?

Answer

Everyone has their own preferred definitions for these terms. We provide some general, high-level descriptions here of how we tend to use these terms on the W3C Internationalization site. Both, localization directives as well as localization properties are related to standardized support for the internationalization (i18n) and localization (l10n) of content. Although the examples in this document are related to XML, the terms may be used in a non-XML setting as well.

Localization Directive

Any "in-situ" construct whose main purpose is "specific" support for the internationalization (i18n) and localization (l10n) for a given, specific "part of content". An example of a localization directive is 'its:translate="yes"' in the following Scalable Vector Graphics (SVG) instance:

<?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"

 "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg width="10cm" height="3cm" viewBox="0 0 1000 300"

    xmlns="http://www.w3.org/2000/svg" version="1.1"

xmlns:its="http://www.w3.org/2005/11/its" >

   <text x="250" y="150" its:translate="yes">
   Hello, out there
 </text>
 <rect x="1" y="1" width="998" height="298"
       fill="none" stroke="blue" stroke-width="2" />

</svg>

'its:translate="yes"' expresses that the content of the 'text' element (textual content of element, including child elements, but excluding attributes) should be translated. Since 'its:translate="yes"' appears in the 'text' element, it is an "in-situ" construct. Since 'its:translate="yes"' only pertains to a specific 'text' element, it only provides "specific" localization support for a given, specific "part of content". 'xml:lang' can be considered as a localization directive.

Localization Property

Any "dislocated" construct whose main purpose is "general" support for the internationalization (i18n) and localization (l10n) of a given, specific "content type". An example of a localization property is 'its:translate="yes"' in the following XML snippet:

<its:documentRule translate="yes" translateSelect="//text"/>

This snippet expresses that the content of all 'text' elements (textual content of element, including child elements, but excluding attributes) of a certain content type should be translated. Since the snippet does not appear in a specific 'text' element, it is a "dislocated" construct. Since it pertains to all 'text' elements, it provides "general" localization support for a given, specific "content type".

Localization properties can be realized in a number of ways and in a number of places:

1. in a kind of header section in a certain content 2. in a separate file associcated with a certain content or content type 3. in a schema

In a sense, localization properties provide high-level general meta data which can provide valuable information for i18n or l10n processes(e.g. configure localization tools automatically similar to a setting or initialization file). Localization directives, on the other hand, provide lower-level meta data (and for example override meta data provided by means of localization properties).

Further Reading

Internationalization Tag Set (ITS) http://www.w3.org/TR/its/