Symbian3/SDK/Source/GUID-2B7F7484-3A44-4A96-9B5D-79DF8A09115A.dita
changeset 0 89d6a7a84779
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     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 concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-2B7F7484-3A44-4A96-9B5D-79DF8A09115A" xml:lang="en"><title>How resource
       
    13 files work</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <p>In the Symbian platform, <xref href="GUID-5F749184-C804-41FC-BA81-038783BDC967.dita">resource</xref> files
       
    15 are used to define UI components used in applications. The UI components consist
       
    16 of data structures that are defined in resource files, and then are loaded
       
    17 by the classes controlling the UI implementation. When UI component implementation
       
    18 is split into these two approaches, it means that resources can be recompiled,
       
    19 for example for new languages, without having to recompile the application
       
    20 code (unless you change the resource identifiers).</p>
       
    21 <p>The following resource files are typically used as source files in Symbian
       
    22 applications:</p>
       
    23 <ul>
       
    24 <li><p><codeph>.rss</codeph> – resource source files used for UI
       
    25 components in the application. For more information, see <xref href="GUID-EC49B54F-7724-433B-BD7F-201DE3B7DAA6.dita">Resource
       
    26 file structure</xref>, <xref href="GUID-23A60DE7-B72D-41BD-9F1E-882D31A7E3C7.dita">Required
       
    27 resource file statements</xref>, and <xref href="GUID-2C74E932-B1CA-434B-AF96-66D52D689620.dita">Optional
       
    28 resource file statements</xref>.</p>
       
    29 </li>
       
    30 <li><p><codeph>_reg.rss</codeph> – resource source file used for
       
    31 registration. For more information, see <xref href="GUID-BF1AAA0D-DF2F-4E1D-A0D2-F419BD32F97A.dita">Creating
       
    32 registration resource files</xref>.</p>
       
    33 </li>
       
    34 <li><p><codeph>.hrh</codeph> – resource header file used to define
       
    35 enumerated sets of values. For more information, see <xref href="GUID-D52E98C3-F5EE-4CE1-A4F5-2EF41A066B8A.dita">Creating
       
    36 resource header files</xref>.</p>
       
    37 </li>
       
    38 <li><p><codeph>.rls</codeph> – localisation files used as a source
       
    39 for UI texts strings in applications, and for managing these texts. For more
       
    40 information, see <xref href="GUID-E111C4E8-1342-4E87-ACB4-5B630AF1501C.dita">Internationalization
       
    41 and localization</xref>.</p>
       
    42 </li>
       
    43 </ul>
       
    44 <p>The structures and symbolic IDs of these files are used in various ways
       
    45 in your code.</p>
       
    46 <p> The resource files above are then compiled to yield the following files:</p>
       
    47 <ul>
       
    48 <li><p><codeph>.rsc</codeph> or <parmname>rNN</parmname>, where
       
    49 NN is a two number Symbian locale ID - compiled, machine-readable resource
       
    50 files used by the application</p>
       
    51 <itemgroup/>
       
    52 </li>
       
    53 <li><p><codeph>.rsg</codeph> - generated resource header file containing
       
    54 the symbolic IDs of the resources for inclusion into your code</p></li>
       
    55 <li><p><codeph> _reg.rsc</codeph> or <parmname>_reg.rNN</parmname>,
       
    56 where NN is a two number Symbian locale ID - compiled, machine-readable resource
       
    57 file used for registration </p></li>
       
    58 </ul>
       
    59 <p>The <parmname>rsc</parmname>, <parmname>rNN</parmname>, and <parmname>_reg.rsc</parmname> files
       
    60 need to be included in your <parmname>sis</parmname> <xref href="GUID-61EE2BE0-7B86-42CD-A03F-857DD8FAC246.dita">installation
       
    61 file</xref> so that they are placed in the device when the application is <xref href="GUID-3BB12D99-8CD7-47B0-A788-C85EF206806C.dita">installed</xref>.</p>
       
    62 <p>When the application framework launches an application, it loads the
       
    63 application resource file. The application framework compares the system locale
       
    64 language setting with the available resource files, and loads the resource
       
    65 file whose extension matches the locale language code. If there is no match,
       
    66 then the system loads the resource file with the extension <parmname>rsc</parmname>.</p>
       
    67 </conbody></concept>