SVG Tiny 1.2 – 20081222

G 国際化のサポート

目次

この付録は情報を提供するものである。 This appendix is informative.

G.1 概要

この付録では SVG による国際化のサポートについての概要を述べる。特定の話題についての詳細は当該仕様の節へのリンクを示す。 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 国際化と SVG

SVG は XML [XML11] の応用であり、国際文字集合を定める Unicode [UNICODE] をサポートする。 SVG is an application of XML [XML11] and thus supports Unicode [UNICODE], which defines the universal character set.

加えて、 SVG は SVG フォント に述べられるように、テキスト描画におけるグリフの精細な制御の仕組みを提供する。これにより、クライアント側の機器に当該の言語のフォントがインストールされていなくても、内容に SVG フォントを含ませたり, SVG フォントへのリンクを張ることで、国際化テキストの表示が可能になる。この機能が提供するのは: 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 がサポートするのは: SVG Tiny 1.2 supports:

SVG Tiny 1.2 は縦書きテキストをサポートしない。 SVG Full 1.2 はサポートする。 SVG Tiny 1.2 does not support vertical text, but SVG Full 1.2 does.

SVG フォント は文脈に応じたグリフの変化に対応する。例えば アラビア語 の文脈上の変化形や言語依存の 漢字グリフ など。 SVG fonts support contextual glyph selection, for example for Arabic contextual forms, and language-dependent Han glyphs.

systemLanguage 属性の利用により、クライアント側システムの言語設定に応じて異なるテキストやグラフィックを表示させることにより、多言語の SVG 文書が可能になる。 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 の国際化のための指針

SVG ジェネレータは W3C の文字データの正規化のための指針 [CHARMOD-NORM] に従うことが奨励される。 SVG generators are encouraged to follow W3C guidelines for normalizing character data [CHARMOD-NORM].

G.4 SVG の国際化とローカライズのためのマークアップ

SVG 内容の国際化対応とローカライズの容易さを得るため、 SVG Tiny 1.2 の RelaxNG スキーマ には 国際化タグセット (ITS) 1.0 [ITS] の宣言が含まれている。このマークアップ語彙の使い方は Best Practices for XML Internationalization [XI18N-BP] で詳細に説明されている。 19.1 外部名前空間とプライベートデータ の定義に従えば ITS 1.0 によるマークアップは SVG Tiny 1.2 の処理には影響しない。 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 宣言が テキスト内容要素, 記述要素, metadata 要素の内容モデルに追加された。 ITS により、内容作成者は、例えば SVG 文書の一部分はローカライズの過程で翻訳されるべきではないことを記述できるようになる。これを実現する ITS 1.0 マークアップを含んだ例を次に示す。この例では its:translate 属性が desc 要素の内容が翻訳されるべきではないことを指示する。 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">翻訳されるべきでない説明</desc>
     <!-- other content -->
</svg> 

次の ITS 規則ファイル its-rules.xml は SVG Tiny 1.2 マークアップにおける翻訳可否についての既定条件を定めている。実装者はこれらの規則を、例えば metadata 要素の内容として、国際的に幅広い利用者に提供することが奨励される。 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> 

上の its:translateRule 要素は、 SVG 名前空間のすべての要素は、特定の SVG 要素を除き(2つ目の its:translateRule )、デフォルトで翻訳不可/不要なことを意味する(最初の its:translateRule )。 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').