Symbian3/SDK/Source/GUID-9D5F3B5E-37FB-5156-808B-F92519412A7F.dita
changeset 0 89d6a7a84779
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-9D5F3B5E-37FB-5156-808B-F92519412A7F.dita	Thu Jan 21 18:18:20 2010 +0000
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
+<!-- This component and the accompanying materials are made available under the terms of the License 
+"Eclipse Public License v1.0" which accompanies this distribution, 
+and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
+<!-- Initial Contributors:
+    Nokia Corporation - initial contribution.
+Contributors: 
+-->
+<!DOCTYPE reference
+  PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
+<reference id="GUID-9D5F3B5E-37FB-5156-808B-F92519412A7F" xml:lang="en"><title>Language
+Dependent Files</title><abstract><p>The text and the images that are required to be localized, must
+be defined in language-specific resource and icon files. You must specify
+the filenames and path of the resource files in the <filepath>PKG</filepath> file,
+for the resource files to be installed on the Symbian device. Based on the
+parameters specified in the <filepath>PKG</filepath> file, the resource files
+that are specific to the supported languages on the Symbian device are installed
+or the resource files for the language selected by the Symbian device user
+are installed. </p> <p>This section explains the ways of specifying resource
+files, based on the requirement for installing resource files for languages
+supported on the Symbian device, or language selected by the Symbian device
+user, during installation. </p> <ul>
+<li id="GUID-C3E6265B-3676-5B59-8A61-F244DA5C9632"><p> <xref href="GUID-9D5F3B5E-37FB-5156-808B-F92519412A7F.dita#GUID-9D5F3B5E-37FB-5156-808B-F92519412A7F/GUID-4756EAA2-C287-5A3C-9940-184A435EC556">Specific to the languages supported by the Symbian device</xref>  </p> </li>
+<li id="GUID-EF3BCF4E-6567-51AE-BB28-FAB70E0F5719"><p> <xref href="GUID-9D5F3B5E-37FB-5156-808B-F92519412A7F.dita#GUID-9D5F3B5E-37FB-5156-808B-F92519412A7F/GUID-B59B2FA0-AA8F-5FC0-AEF9-37C10AE74E62">Specific to the language selected by the Symbian device user</xref>  </p> </li>
+<li id="GUID-71E8A9E4-9EAA-5726-9B20-C591FFA227FF"><p> <xref href="GUID-9D5F3B5E-37FB-5156-808B-F92519412A7F.dita#GUID-9D5F3B5E-37FB-5156-808B-F92519412A7F/GUID-B188FC32-F607-5927-85DB-6E6813DC1047">Specific to the languages supported by the Symbian device or language selected
+by Symbian device user</xref>  </p> </li>
+</ul></abstract><prolog><metadata><keywords/></metadata></prolog><refbody>
+<section id="GUID-4756EAA2-C287-5A3C-9940-184A435EC556"><title>Specific to
+the languages supported by the Symbian device </title> <p>Specify each of
+the language-specific resource files within an IF conditional block and set
+the <codeph>SUPPORTED_LANGUAGE</codeph> parameter to a <xref href="GUID-31C133DE-F245-5992-9A41-20A99291E72A.dita#GUID-31C133DE-F245-5992-9A41-20A99291E72A/GUID-1F01A43F-64F7-5C90-92D1-974356A6C386">TLanguage numerical value</xref>, as shown in the following code snippet: </p> <codeblock id="GUID-ED64C003-6656-53EF-AAD7-98F71C305874" xml:space="preserve">
+if supported_language=01 
+    "HelloWorld.r01"          -"!: \ resource\apps\HelloWorld.r01"
+endif
+
+if supported_language=02 
+    "HelloWorld.r02"          -"!: \ resource\apps\HelloWorld.r02"
+endif</codeblock> <p>During installation, the languages supported by the Symbian
+device are matched with the languages supported in the SIS file. The result
+is based on the following two conditions: </p> <ul>
+<li id="GUID-9D31BDA0-E407-5E7F-8906-E10473C03E34"><p>If an exact match is
+found, the files corresponding to that language are copied to the Symbian
+device. </p> <p>For example, if the SIS file specifies UK English(01), French(02)
+and Zulu(98), and the Symbian device supports only UK English(01) and French(02),
+during installation, only the files related to UK English(01) and French(02)
+are copied to the Symbian device. The files for Zulu(98) are not copied to
+the Symbian device. </p> </li>
+<li id="GUID-248D9FB8-EEE7-5362-B76D-5397CE21DE99"><p>If an exact match is
+not found for any of the device supported languages, the files for all equivalent
+languages (supported by the SIS files) corresponding to each of the device
+supported languages are copied to the Symbian device. </p> <p>For example,
+if the SIS file supports UK English(01), French(02) and International English(47),
+and the Symbian device supports only American English(10) then during installation,
+as an exact match for American English is not found, the files for UK English
+and International English (both equivalent match) are copied to the Symbian
+device. See <xref href="GUID-10A50B7C-63DB-599B-86C1-17989595CBD2.dita">Equivalent
+Languages Reference</xref> for a list of all language equivalents supported
+by Symbian Foundation. </p> </li>
+</ul> <p> <b>Important</b>: </p> <p>Language-specific resource files must
+have filenames with language-specific extensions. For example, the resource
+files for UK English(01) must have the filename as <filepath>Filename.r01</filepath>. </p> <p>If
+you use the <filepath>.rsc</filepath> file extension, as shown in the following
+code snippet, and if both the languages are supported on the Symbian device,
+the resource files of UK English(01) are overwritten by resource files of
+French (02) language during installation. </p> <codeblock id="GUID-6DB66C22-4CDC-51B1-B3E3-789567FCC3E0" xml:space="preserve">
+if supported_language=01 //UK English
+    "HelloWorld.r01"          -"!: \ resource\apps\HelloWorld.rsc" //do not use this extension format
+endif
+
+if supported_language=02 //French
+    "HelloWorld.r02"          -"!: \ resource\apps\HelloWorld.rsc"
+endif</codeblock> </section>
+<section id="GUID-B59B2FA0-AA8F-5FC0-AEF9-37C10AE74E62"><title>Specific to
+the language selected by the Symbian device user </title> <p>You can use one
+of the following formats: </p><ul>
+<li><p>Format1</p></li>
+<li><p>Format2</p></li>
+</ul> <p><b>Format1</b> </p> <p>Specify each of the language-specific resource
+files within an IF conditional block and set the <codeph>LANGUAGE</codeph> parameter
+to a <xref href="GUID-31C133DE-F245-5992-9A41-20A99291E72A.dita#GUID-31C133DE-F245-5992-9A41-20A99291E72A/GUID-1F01A43F-64F7-5C90-92D1-974356A6C386">TLanguage
+numerical value</xref>, as shown in the following code snippet: </p> <codeblock id="GUID-FE86BD13-40C2-5F56-8630-542C56B6CFBE" xml:space="preserve">
+if language=01
+    "HelloWorld.r01"          -"!: \ resource\apps\HelloWorld.r01"
+endif
+
+if language=02
+    "HelloWorld.r02"          -"!: \ resource\apps\HelloWorld.r02"
+endif</codeblock> <p>During installation, Symbian device user is prompted
+to select a language. Based on the selection, the resource files for the selected
+language are installed. </p> <p>For example, if the SIS file specifies UK
+English(01) and French(02), Symbian device user is prompted to select UK English
+or French language for installation. Based on the selection, the resource
+files for the selected language are copied to the Symbian device. </p> <p>If
+the Symbian device supports only one language, the resource files for only
+that language are installed. In this scenario the Symbian device user is not
+prompted to select a language for installation. </p> <p><b>Format2</b> </p> <p>The
+syntax is as follows: </p> <codeblock id="GUID-E0599A9A-2174-5B99-8D2A-3F05BF4B3343" xml:space="preserve">{"source-filename1", "source-filename2", ...} - "destination-filename"[, install-options]</codeblock> <p>For example: </p> <codeblock id="GUID-9F400876-379E-55F8-B751-9EC04362BC0F" xml:space="preserve">{
+"examples\HelloWorld\HelloWorld.ruk"
+"examples\HelloWorld\HelloWorld.rfr"
+"examples\HelloWorld\HelloWorld.rzu"
+}-"!:\resource\apps\HelloWorld.rsc"</codeblock> <p>For a description of each
+argument, see <xref href="GUID-B3BE018B-0EC5-5866-9BD7-50CBF5670324.dita">Language-Neutral
+Files</xref>. </p> <ul>
+<li id="GUID-E9BD1B9C-86B4-5C91-A0DA-21CF3A0DF87A"><p>The opening brace denotes
+the start of the block of language-dependent files. </p> </li>
+<li id="GUID-06331C76-E7AD-560C-B260-AA8C97B66725"><p>The order of the files
+must be the same as the order in which the languages are specified in the
+languages line. </p> </li>
+<li id="GUID-46884386-2751-52FE-8954-276AAC437E3E"><p>The number of files
+specified must be the same as the number of languages supported. </p> </li>
+<li id="GUID-663D8D87-7E19-5733-8CE4-CD5A511A3344"><p>Install options can
+be specified after the destination name, for example, <codeph>FT</codeph> to
+display a language specific dialog. </p> </li>
+<li id="GUID-9753E3DF-12B3-5A29-930A-862474F138E0"><p>Language dependent file
+blocks, and other conditional blocks are evaluated at the end of the installation.
+For example, the executables launched using <codeph>FILERUN</codeph> or <codeph>FILEMIME</codeph> statements
+must not depend on conditionally installed or language-dependent files in
+the same package file. </p> </li>
+</ul> <p>This format is commonly used to specify lists of resource files.
+Resource files are installed to <filepath>\resource\apps</filepath>. </p> <p>If
+a resource file is to be accessed only by the application, it can be installed
+to the application's private directory, <filepath>\private\&lt;process   
+          SID&gt;\</filepath>. The SID (secure ID) is normally the same as the <codeph>UID3</codeph>,
+which is specified in the <filepath>MMP</filepath> file. </p> <p>An application
+registration (resource) file is an exception. The applications built into
+the ROM must provide their registration file in the <filepath>z:\private\10003a3f\apps</filepath> and
+applications installed through Software Installer must locate their registration
+file in <filepath>\private\10003a3f\import\apps</filepath>. </p> <note> The
+registration file in ROM must be located in <filepath>z:\private\10003a3f\import\apps\</filepath> and
+can be eclipsed.</note><p>Also, ECom registration resource files for ECom
+plug-ins must be installed in <filepath>\resource\plugins\</filepath>. </p> </section>
+<section id="GUID-B188FC32-F607-5927-85DB-6E6813DC1047"><title>Specific to
+the languages supported by the Symbian device or language selected by Symbian
+device user</title> <p>Specify each of the language-specific resource files
+within an IF conditional block and set the <codeph>SUPPORTED_LANGUAGE</codeph> and <codeph>LANGUAGE</codeph> parameters
+to a <xref href="GUID-31C133DE-F245-5992-9A41-20A99291E72A.dita#GUID-31C133DE-F245-5992-9A41-20A99291E72A/GUID-1F01A43F-64F7-5C90-92D1-974356A6C386">TLanguage
+numerical value</xref> separated by an <codeph>OR</codeph> condition, as shown
+in the following code snippet: </p> <codeblock id="GUID-50F06B9B-3552-5221-80C1-F9B06BAC328A" xml:space="preserve">
+if supported_language=02 or language=02
+    "HelloWorld.r01"          -"!: \ resource\apps\HelloWorld.r01"
+endif
+
+if supported_language=98 or language=98
+    "HelloWorld.r98"          -"!: \ resource\apps\HelloWorld.r98"
+endif</codeblock> <p> <b>Important:</b> Language-specific resource files must
+have filenames with language-specific extensions. For example, the resource
+files for UK English(01) must have the filename as <filepath>Filename.r01</filepath>. </p> <p>If
+the SIS file does not include the Symbian device supported languages or its
+equivalent, the Symbian device user is prompted to select a language. Based
+on the selection, the files for the selected language are installed. </p> <p>For
+example, if the SIS file supports French(02) and Zulu(98), and the Symbian
+device supports UK English(01) and German(03), the Symbian device user is
+prompted to select French or Zulu language for installation. Based on the
+selection, the files for the selected language are installed. </p> <note>During
+installation, if an exact or an equivalent language match is not found, the
+Symbian device user is prompted to select a language. If you have not specified
+the <codeph>LANGUAGE</codeph> parameter in <filepath>PKG</filepath> file,
+as there is no resource file found for the selected language, no resource
+files are installed. To avoid this, ensure that you always specify the <codeph>LANGUAGE</codeph> parameter
+in the <filepath>PKG</filepath> file. </note> </section>
+</refbody></reference>
\ No newline at end of file