SVG Tiny 1.2 – 20081222

G Internationalization Support

Contents

This appendix is informative.

G.1 Introduction

This appendix provides a brief summary of SVG's support for internationalization. The appendix is hyperlinked to the sections of the specification which elaborate on particular topics.

G.2 Internationalization and SVG

SVG is an application of XML [XML11] and thus supports Unicode [UNICODE], which defines the universal character set.

Additionally, SVG provides a mechanism for precise control of the glyphs used to draw text strings, which is described in SVG Fonts. This allows content to supply, or link to, SVG Fonts to display international text, even if no fonts for that language are installed on the client machine. This facility provides:

SVG Tiny 1.2 supports:

SVG Tiny 1.2 does not support vertical text, but SVG Full 1.2 does.

SVG fonts support contextual glyph selection, for example for Arabic contextual forms, and language-dependent Han glyphs.

Multi-language SVG documents are possible by utilizing the 'systemLanguage' attribute to have different text strings or graphics appear based on the client machine's language setting.

G.3 SVG internationalization guidelines

SVG generators are encouraged to follow W3C guidelines for normalizing character data [CHARMOD-NORM].

G.4 Markup for the internationalization and localization of SVG

To help the international adoption and easy localization of SVG content, the SVG Tiny 1.2 RelaxNG schema contains declarations from the Internationalization Tag Set (ITS) 1.0 [ITS]. The usage of this markup vocabulary is explained in detail in the Best Practices for XML Internationalization document [XI18N-BP]. The markup from ITS 1.0 does not influence SVG Tiny 1.2 processing, following the definitions in the section 19.1 Foreign namespaces and private data.

ITS 1.0 local markup declarations have been added to the content model of the text content elements, the descriptive elements, and the 'metadata' element. ITS enables a content author to express, for example, that some parts of an SVG document should not be translated during the localization process. This is demonstrated by the following example which contains ITS 1.0 markup. In this example, the 'its:translate' attribute expresses that the content of the 'desc' element should not be translated.

Example: its.svg
<svg version="1.2" baseProfile="tiny"
     xmlns="http://www.w3.org/2000/svg"
     xmlns:its="http://www.w3.org/2005/11/its"> 

     <desc its:translate="no">An explanation which should not be translated.</desc>
     <!-- other content -->
</svg> 

The following ITS rules file, its-rules.xml, specifies some defaults about the translatability of SVG Tiny 1.2 markup. Implementors are encouraged to provide theses rules to users with an international audience, for example as the content of the 'metadata' element.

Example: its-rules.xml
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0" 
           xmlns:svg="http://www.w3.org/2000/svg">
  <its:translateRule selector="//svg:*" translate="no"/>
  <its:translateRule selector="//svg:text | //svg:tspan | //svg:textArea | 
                               //svg:title | //svg:desc | //svg:metadata" 
                               translate="yes"/> 
</its:rules> 

The 'its:translateRule' elements above mean that the default for all elements from the SVG namespace is that they are not translatable (first 'its:translateRule'), with the exception of the specific SVG elements listed (second 'its:translateRule').