sysmodellibs/sysmodelgen/doc/sysmodel/SMG-Input-Files/Localisation-XMLFile.html
author Bob Rosenberg <bob.rosenberg@nokia.com>
Wed, 13 Oct 2010 16:21:25 +0100
changeset 7 3c36c452f013
permissions -rw-r--r--
Version 2.0 release of System Model Generator, which draws 3.x syntax system definition files

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <!-- Generated by Xbuild version: 5.0.20 -->
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="show-comments" content="" />
	<title>Localization XML File in System Model Generator Input Files</title>    
	<link href="../../_stock/css/reset.css" rel="stylesheet" type="text/css" />
	<link href="../../_stock/css/portal.css" rel="stylesheet" type="text/css" />
	<link href="../../_stock/css/iefix.css" rel="stylesheet" type="text/css" />
	<link href="../../_stock/css/ui.tabs.css" rel="stylesheet" type="text/css" />
	<link href="../../_stock/css/developer.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" type="text/css" href="../../_stock/css/ui.css" media="screen" />
	<link rel="stylesheet" type="text/css" href="../../_stock/css/sysdoc.css" media="screen" />
	<link rel="stylesheet" type="text/css" href="../../_stock/css/sdlplugin.css" media="screen" />
    </head>
    <body>
	<div id="main_content">
	    <table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
		    <td valign="top" width="100%">
			<div id="main_content_txt">
			    <div class="main_content_padding">		
                                <div id="main">
                                    <div id="authoredContent">
                                        <div class="section">
<a name="Localisation"></a><h1>Localization XML File</h1><div class="section">
<h2>Purpose</h2><p>
		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: 
	  </p><ul> 
		<li>
 
		  <p>
			Provide abbreviations of item names. For example,
			&#8220;<code>Application Launch Services</code>&#8221;.  can appear as &#8220;<code>App. Launch
			Services</code>&#8221;. 
		  </p> 
		</li>
 
		<li>
 
		  <p>
			Include special characters in names, such as soft hyphens. For
			example, "<code>Graphics Device Interface</code>" can appear as "<code>Graphics Dev&amp;#xad;ice Interface</code>". This allows the word to split across
			multiple lines on the diagram if it is needed. 
		  </p> 
		</li>
 
		<li>
 
		  <p>
			Provide a localized translation of a word. For example, "Device
			Provisioning" can appear as "&#31471;&#26411;&#31649;&#29702;". 
		  </p> 
		</li>
 
	  </ul>
	  
<p>If using the Localization XML file just to provide abbreviations, you may be better of using a <a href="Dictionary-XMLFile.html">Dictionary XML file</a> instead.</p>	  
	  
	  </div>
<div class="section">
<h2>Syntax</h2>
<div class="Example"><code class="xml">&lt;?xml version="1.0"?&gt;  
<br>&lt;display-names <span class="opt">xml:lang="<var>language-code</var></span> <span class="opt">id-namespace="<var>uri</var>"</span> <span class="opt"><var>&#133;namespaces&#133;</var></span> &gt;
<div class="indent">    &lt;abbrev ref="<var>id</var>" abbrev="<var>abbreviation</var>"/&gt;
<br>    &lt;abbrev name="<var>item-name</var>" abbrev="<var>abbreviation</var>"/&gt;
<br>    &#133;
</div>&lt;/display-names&gt;</code></div>

<p>There are two ways to assign a localized name to a system model item. </p>
<ol>
<li><strong>By ID</strong> - you can use the <code>ref</code> attribute to specify the unique ID of a single system model item to rename.</li>
<li><strong>By name</strong> - you can use the <code>name</code> attribute to specify that any system model item with that human-readable name will be renamed.</li>
</ol>

<p>The root element <code>display-names</code> can take these optional attributes: 
	  </p><ul> 
	  
		<li>
		  <p>
			<code class="xml">xml:lang="<var>language-code</var>"</code>: This indicates that the file is for localisation and not just a set of abbreviations. 
			The affects of setting this are: <ol>
			<li>The xml:lang will be set to this value in the generated SVG. This lets you put CSS like this in the Shapes XML: 
				<br/><code class="CSS">text.title:lang(jp) {letter-spacing: -0.15}</code><br/>
				so that you can fine tune the diagram for different languages. 

				</li>
			<li>All generated numbers (eg when counting in the legend) will be localised (if possible) to this language.</li>
			</ol>
		  </p> 
		</li>

		<li>
		  <p>
			<code class="xml">id-namespace="<var>uri</var>"</code>: The default namespace for all <code>ref</code> attributes in the XML file. Has the same meaning, usage and default value as <code>id-namespace</code> in the <a href="http://developer.symbian.org/wiki/index.php/System_Definition/Root#Attributes">System Definition</a>.
		  </p> 
		</li>

		<li>
		  <p>
			<code><var>namespaces</var></code>: Any namespace declaration should be done in the root element. ID references can use namespace prefixes to associate with system model items. See <a href="http://developer.symbian.org/wiki/index.php/System_Definition/Attributes#Namespacing_names">Namespacing names</A> in the System Definition specification.
		  </p> 
		</li>


</div>
<div class="section">
<h2>Example</h2>
<div class="Example"><code class="xml">&lt;?xml version="1.0" ?&gt; 
<br>&lt;display-names xml:lang="jp"&gt;
<div class="indent">   &lt;abbrev name="Device Provisioning" abbrev="端末管理" /&gt; 
<br>  &lt;abbrev name="PIM App Support" abbrev="PIM アプリケーション・サポート" /&gt; 
<br>        &lt;abbrev name="Multimedia" abbrev="マルチメディア" /&gt; 
<br>  &lt;abbrev name="Messaging Application Support" abbrev="メッセージング・アプリケーション・サポート" /&gt; 
<br>  &lt;abbrev name="Graphics" abbrev="グラフィックス" /&gt; 
<br>  &lt;abbrev name="Application Framework" abbrev="アプリケーション・フレームワーク" /&gt;
<br>  &lt;abbrev name="Plugin Compo&amp;#xad;nent" abbrev="プラグイン コンポーネント"/&gt;
</div>&lt;/display-names&gt;</code></div></div>
<div class="section">
<h2> See also</h2><p>
		<a href="System-Info-XMLFile.html#SystemInfoXML">SystemInfo XML File</a> 
	  </p><p>
		<a href="Dependencies-sysinfo.html">Dependencies Sysinfo File</a> 
	  </p><p>
		<a href="Values-XML-index.html#valuesxml" title="The Values XML files are used to define default and per-component display properties. You can use a values XML file to define colors, patterns, border shapes, or border styles of the components.">Values XML File</a> 
	  </p></div>
</div>

                                    </div>
                                    <div id="printer_copyright">
                                        <div id="printer_copyright_padding">
                                            Copyright &copy;2009  Nokia Corporation and/or its subsidiary(-ies). All rights reserved. License: <a href="http://www.symbianfoundation.org/legal/sfl-v10.html">SFL</a>
                                        </div>
                                    </div>
                                </div>
			    </div>
			</div>
		    </td>
		</tr>
	    </table>
	    <div style="clear: both"></div>
	</div>
	<div id="includedFooter">
	    <div id="devnet_footer">
            <div style="float: left;">Copyright &copy;2009  Nokia Corporation and/or its subsidiary(-ies). All rights reserved. License: <a href="http://www.symbianfoundation.org/legal/sfl-v10.html">SFL</a>. </div>
            <div id='BUILD_VERSION'></div>
	    </div>
	</div>
</body>
</html>