|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE reference |
|
11 PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd"> |
|
12 <reference id="GUID-9D5F3B5E-37FB-5156-808B-F92519412A7F" xml:lang="en"><title>Language |
|
13 Dependent Files</title><abstract><p>The text and the images that are required to be localized, must |
|
14 be defined in language-specific resource and icon files. You must specify |
|
15 the filenames and path of the resource files in the <filepath>PKG</filepath> file, |
|
16 for the resource files to be installed on the Symbian device. Based on the |
|
17 parameters specified in the <filepath>PKG</filepath> file, the resource files |
|
18 that are specific to the supported languages on the Symbian device are installed |
|
19 or the resource files for the language selected by the Symbian device user |
|
20 are installed. </p> <p>This section explains the ways of specifying resource |
|
21 files, based on the requirement for installing resource files for languages |
|
22 supported on the Symbian device, or language selected by the Symbian device |
|
23 user, during installation. </p> <ul> |
|
24 <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> |
|
25 <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> |
|
26 <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 |
|
27 by Symbian device user</xref> </p> </li> |
|
28 </ul></abstract><prolog><metadata><keywords/></metadata></prolog><refbody> |
|
29 <section id="GUID-4756EAA2-C287-5A3C-9940-184A435EC556"><title>Specific to |
|
30 the languages supported by the Symbian device </title> <p>Specify each of |
|
31 the language-specific resource files within an IF conditional block and set |
|
32 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"> |
|
33 if supported_language=01 |
|
34 "HelloWorld.r01" -"!: \ resource\apps\HelloWorld.r01" |
|
35 endif |
|
36 |
|
37 if supported_language=02 |
|
38 "HelloWorld.r02" -"!: \ resource\apps\HelloWorld.r02" |
|
39 endif</codeblock> <p>During installation, the languages supported by the Symbian |
|
40 device are matched with the languages supported in the SIS file. The result |
|
41 is based on the following two conditions: </p> <ul> |
|
42 <li id="GUID-9D31BDA0-E407-5E7F-8906-E10473C03E34"><p>If an exact match is |
|
43 found, the files corresponding to that language are copied to the Symbian |
|
44 device. </p> <p>For example, if the SIS file specifies UK English(01), French(02) |
|
45 and Zulu(98), and the Symbian device supports only UK English(01) and French(02), |
|
46 during installation, only the files related to UK English(01) and French(02) |
|
47 are copied to the Symbian device. The files for Zulu(98) are not copied to |
|
48 the Symbian device. </p> </li> |
|
49 <li id="GUID-248D9FB8-EEE7-5362-B76D-5397CE21DE99"><p>If an exact match is |
|
50 not found for any of the device supported languages, the files for all equivalent |
|
51 languages (supported by the SIS files) corresponding to each of the device |
|
52 supported languages are copied to the Symbian device. </p> <p>For example, |
|
53 if the SIS file supports UK English(01), French(02) and International English(47), |
|
54 and the Symbian device supports only American English(10) then during installation, |
|
55 as an exact match for American English is not found, the files for UK English |
|
56 and International English (both equivalent match) are copied to the Symbian |
|
57 device. See <xref href="GUID-10A50B7C-63DB-599B-86C1-17989595CBD2.dita">Equivalent |
|
58 Languages Reference</xref> for a list of all language equivalents supported |
|
59 by Symbian Foundation. </p> </li> |
|
60 </ul> <p> <b>Important</b>: </p> <p>Language-specific resource files must |
|
61 have filenames with language-specific extensions. For example, the resource |
|
62 files for UK English(01) must have the filename as <filepath>Filename.r01</filepath>. </p> <p>If |
|
63 you use the <filepath>.rsc</filepath> file extension, as shown in the following |
|
64 code snippet, and if both the languages are supported on the Symbian device, |
|
65 the resource files of UK English(01) are overwritten by resource files of |
|
66 French (02) language during installation. </p> <codeblock id="GUID-6DB66C22-4CDC-51B1-B3E3-789567FCC3E0" xml:space="preserve"> |
|
67 if supported_language=01 //UK English |
|
68 "HelloWorld.r01" -"!: \ resource\apps\HelloWorld.rsc" //do not use this extension format |
|
69 endif |
|
70 |
|
71 if supported_language=02 //French |
|
72 "HelloWorld.r02" -"!: \ resource\apps\HelloWorld.rsc" |
|
73 endif</codeblock> </section> |
|
74 <section id="GUID-B59B2FA0-AA8F-5FC0-AEF9-37C10AE74E62"><title>Specific to |
|
75 the language selected by the Symbian device user </title> <p>You can use one |
|
76 of the following formats: </p><ul> |
|
77 <li><p>Format1</p></li> |
|
78 <li><p>Format2</p></li> |
|
79 </ul> <p><b>Format1</b> </p> <p>Specify each of the language-specific resource |
|
80 files within an IF conditional block and set the <codeph>LANGUAGE</codeph> parameter |
|
81 to a <xref href="GUID-31C133DE-F245-5992-9A41-20A99291E72A.dita#GUID-31C133DE-F245-5992-9A41-20A99291E72A/GUID-1F01A43F-64F7-5C90-92D1-974356A6C386">TLanguage |
|
82 numerical value</xref>, as shown in the following code snippet: </p> <codeblock id="GUID-FE86BD13-40C2-5F56-8630-542C56B6CFBE" xml:space="preserve"> |
|
83 if language=01 |
|
84 "HelloWorld.r01" -"!: \ resource\apps\HelloWorld.r01" |
|
85 endif |
|
86 |
|
87 if language=02 |
|
88 "HelloWorld.r02" -"!: \ resource\apps\HelloWorld.r02" |
|
89 endif</codeblock> <p>During installation, Symbian device user is prompted |
|
90 to select a language. Based on the selection, the resource files for the selected |
|
91 language are installed. </p> <p>For example, if the SIS file specifies UK |
|
92 English(01) and French(02), Symbian device user is prompted to select UK English |
|
93 or French language for installation. Based on the selection, the resource |
|
94 files for the selected language are copied to the Symbian device. </p> <p>If |
|
95 the Symbian device supports only one language, the resource files for only |
|
96 that language are installed. In this scenario the Symbian device user is not |
|
97 prompted to select a language for installation. </p> <p><b>Format2</b> </p> <p>The |
|
98 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">{ |
|
99 "examples\HelloWorld\HelloWorld.ruk" |
|
100 "examples\HelloWorld\HelloWorld.rfr" |
|
101 "examples\HelloWorld\HelloWorld.rzu" |
|
102 }-"!:\resource\apps\HelloWorld.rsc"</codeblock> <p>For a description of each |
|
103 argument, see <xref href="GUID-B3BE018B-0EC5-5866-9BD7-50CBF5670324.dita">Language-Neutral |
|
104 Files</xref>. </p> <ul> |
|
105 <li id="GUID-E9BD1B9C-86B4-5C91-A0DA-21CF3A0DF87A"><p>The opening brace denotes |
|
106 the start of the block of language-dependent files. </p> </li> |
|
107 <li id="GUID-06331C76-E7AD-560C-B260-AA8C97B66725"><p>The order of the files |
|
108 must be the same as the order in which the languages are specified in the |
|
109 languages line. </p> </li> |
|
110 <li id="GUID-46884386-2751-52FE-8954-276AAC437E3E"><p>The number of files |
|
111 specified must be the same as the number of languages supported. </p> </li> |
|
112 <li id="GUID-663D8D87-7E19-5733-8CE4-CD5A511A3344"><p>Install options can |
|
113 be specified after the destination name, for example, <codeph>FT</codeph> to |
|
114 display a language specific dialog. </p> </li> |
|
115 <li id="GUID-9753E3DF-12B3-5A29-930A-862474F138E0"><p>Language dependent file |
|
116 blocks, and other conditional blocks are evaluated at the end of the installation. |
|
117 For example, the executables launched using <codeph>FILERUN</codeph> or <codeph>FILEMIME</codeph> statements |
|
118 must not depend on conditionally installed or language-dependent files in |
|
119 the same package file. </p> </li> |
|
120 </ul> <p>This format is commonly used to specify lists of resource files. |
|
121 Resource files are installed to <filepath>\resource\apps</filepath>. </p> <p>If |
|
122 a resource file is to be accessed only by the application, it can be installed |
|
123 to the application's private directory, <filepath>\private\<process |
|
124 SID>\</filepath>. The SID (secure ID) is normally the same as the <codeph>UID3</codeph>, |
|
125 which is specified in the <filepath>MMP</filepath> file. </p> <p>An application |
|
126 registration (resource) file is an exception. The applications built into |
|
127 the ROM must provide their registration file in the <filepath>z:\private\10003a3f\apps</filepath> and |
|
128 applications installed through Software Installer must locate their registration |
|
129 file in <filepath>\private\10003a3f\import\apps</filepath>. </p> <note> The |
|
130 registration file in ROM must be located in <filepath>z:\private\10003a3f\import\apps\</filepath> and |
|
131 can be eclipsed.</note><p>Also, ECom registration resource files for ECom |
|
132 plug-ins must be installed in <filepath>\resource\plugins\</filepath>. </p> </section> |
|
133 <section id="GUID-B188FC32-F607-5927-85DB-6E6813DC1047"><title>Specific to |
|
134 the languages supported by the Symbian device or language selected by Symbian |
|
135 device user</title> <p>Specify each of the language-specific resource files |
|
136 within an IF conditional block and set the <codeph>SUPPORTED_LANGUAGE</codeph> and <codeph>LANGUAGE</codeph> parameters |
|
137 to a <xref href="GUID-31C133DE-F245-5992-9A41-20A99291E72A.dita#GUID-31C133DE-F245-5992-9A41-20A99291E72A/GUID-1F01A43F-64F7-5C90-92D1-974356A6C386">TLanguage |
|
138 numerical value</xref> separated by an <codeph>OR</codeph> condition, as shown |
|
139 in the following code snippet: </p> <codeblock id="GUID-50F06B9B-3552-5221-80C1-F9B06BAC328A" xml:space="preserve"> |
|
140 if supported_language=02 or language=02 |
|
141 "HelloWorld.r01" -"!: \ resource\apps\HelloWorld.r01" |
|
142 endif |
|
143 |
|
144 if supported_language=98 or language=98 |
|
145 "HelloWorld.r98" -"!: \ resource\apps\HelloWorld.r98" |
|
146 endif</codeblock> <p> <b>Important:</b> Language-specific resource files must |
|
147 have filenames with language-specific extensions. For example, the resource |
|
148 files for UK English(01) must have the filename as <filepath>Filename.r01</filepath>. </p> <p>If |
|
149 the SIS file does not include the Symbian device supported languages or its |
|
150 equivalent, the Symbian device user is prompted to select a language. Based |
|
151 on the selection, the files for the selected language are installed. </p> <p>For |
|
152 example, if the SIS file supports French(02) and Zulu(98), and the Symbian |
|
153 device supports UK English(01) and German(03), the Symbian device user is |
|
154 prompted to select French or Zulu language for installation. Based on the |
|
155 selection, the files for the selected language are installed. </p> <note>During |
|
156 installation, if an exact or an equivalent language match is not found, the |
|
157 Symbian device user is prompted to select a language. If you have not specified |
|
158 the <codeph>LANGUAGE</codeph> parameter in <filepath>PKG</filepath> file, |
|
159 as there is no resource file found for the selected language, no resource |
|
160 files are installed. To avoid this, ensure that you always specify the <codeph>LANGUAGE</codeph> parameter |
|
161 in the <filepath>PKG</filepath> file. </note> </section> |
|
162 </refbody></reference> |