diff -r 5b32dc297d05 -r 3c36c452f013 sysmodellibs/sysmodelgen/doc/sysmodel/SMG-Input-Files/Localisation-XMLFile.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sysmodellibs/sysmodelgen/doc/sysmodel/SMG-Input-Files/Localisation-XMLFile.html Wed Oct 13 16:21:25 2010 +0100 @@ -0,0 +1,151 @@ + + + + + + Localization XML File in System Model Generator Input Files + + + + + + + + + + +
+ + + + +
+
+
+
+
+
+

Localization XML File

+

Purpose

+ You can use the Localization XML file to customize the appearance of an + item name on the model. It enables you to perform the following tasks: +

    +
  • + +

    + Provide abbreviations of item names. For example, + “Application Launch Services”. can appear as “App. Launch + Services”. +

    +
  • + +
  • + +

    + Include special characters in names, such as soft hyphens. For + example, "Graphics Device Interface" can appear as "Graphics Dev­ice Interface". This allows the word to split across + multiple lines on the diagram if it is needed. +

    +
  • + +
  • + +

    + Provide a localized translation of a word. For example, "Device + Provisioning" can appear as "端末管理". +

    +
  • + +
+ +

If using the Localization XML file just to provide abbreviations, you may be better of using a Dictionary XML file instead.

+ +
+
+

Syntax

+
<?xml version="1.0"?> +
<display-names xml:lang="language-code id-namespace="uri" …namespaces… > +
<abbrev ref="id" abbrev="abbreviation"/> +
<abbrev name="item-name" abbrev="abbreviation"/> +
… +
</display-names>
+ +

There are two ways to assign a localized name to a system model item.

+
    +
  1. By ID - you can use the ref attribute to specify the unique ID of a single system model item to rename.
  2. +
  3. By name - you can use the name attribute to specify that any system model item with that human-readable name will be renamed.
  4. +
+ +

The root element display-names can take these optional attributes: +

    + +
  • +

    + xml:lang="language-code": This indicates that the file is for localisation and not just a set of abbreviations. + The affects of setting this are:

      +
    1. The xml:lang will be set to this value in the generated SVG. This lets you put CSS like this in the Shapes XML: +
      text.title:lang(jp) {letter-spacing: -0.15}
      + so that you can fine tune the diagram for different languages. + +
    2. +
    3. All generated numbers (eg when counting in the legend) will be localised (if possible) to this language.
    4. +
    +

    +
  • + +
  • +

    + id-namespace="uri": The default namespace for all ref attributes in the XML file. Has the same meaning, usage and default value as id-namespace in the System Definition. +

    +
  • + +
  • +

    + namespaces: Any namespace declaration should be done in the root element. ID references can use namespace prefixes to associate with system model items. See Namespacing names in the System Definition specification. +

    +
  • + + +
+
+

Example

+
<?xml version="1.0" ?> +
<display-names xml:lang="jp"> +
<abbrev name="Device Provisioning" abbrev="端末管理" /> +
<abbrev name="PIM App Support" abbrev="PIM アプリケーション・サポート" /> +
<abbrev name="Multimedia" abbrev="マルチメディア" /> +
<abbrev name="Messaging Application Support" abbrev="メッセージング・アプリケーション・サポート" /> +
<abbrev name="Graphics" abbrev="グラフィックス" /> +
<abbrev name="Application Framework" abbrev="アプリケーション・フレームワーク" /> +
<abbrev name="Plugin Compo&#xad;nent" abbrev="プラグイン コンポーネント"/> +
</display-names>
+ +
+ +
+ +
+
+
+
+
+
+
+ +
+ +