Symbian3/PDK/Source/GUID-88917386-AD48-4C76-A1C7-46F0B1E85A18.dita
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
equal deleted inserted replaced
4:4816d766a08a 5:f345bda72bc4
    15 <ol>
    15 <ol>
    16 <li id="GUID-4C53C331-EDCB-49A6-A2AE-1946E0CBA85E"><p>In the resource
    16 <li id="GUID-4C53C331-EDCB-49A6-A2AE-1946E0CBA85E"><p>In the resource
    17 file for your application, use unique symbolic IDs, also known as a logical
    17 file for your application, use unique symbolic IDs, also known as a logical
    18 name, for all UI texts that need to appear on the screen.</p>
    18 name, for all UI texts that need to appear on the screen.</p>
    19 <note>
    19 <note>
    20 <p>The Symbian platform provides some unique symbolic IDs that you can use
    20 <p>The Symbian platform provides some unique symbolic IDs that you can
    21 in your code, which means that the UI texts used for these IDs match those
    21 use in your code, which means that the UI texts used for these IDs match those
    22 used elsewhere in the device. Do not define any values for these symbolic
    22 used elsewhere in the device. Do not define any values for these symbolic
    23 IDs.</p>
    23 IDs.</p>
    24 </note>
    24 </note>
    25 </li>
    25 </li>
    26 <li id="GUID-F64825B7-7A7F-4F07-ADFF-21C794534B39"><p>For each language
    26 <li id="GUID-F64825B7-7A7F-4F07-ADFF-21C794534B39"><p>For each language
    27 your application supports, create a resource file as follows:</p>
    27 your application supports, create a resource file as follows:</p>
    28 <ol>
    28 <ol>
    29 <li id="GUID-509946C5-B45A-4481-8D71-F74DF32EF18A"><p>Create a text
    29 <li id="GUID-509946C5-B45A-4481-8D71-F74DF32EF18A"><p>Create a text
    30 file with the extension <parmname>lNN</parmname>, where NN is a two digit
    30 file with the extension <parmname>lNN</parmname>, where NN is a two digit
    31 number that matches the Symbian OS language code for your target language.</p>
    31 number that matches the Symbian platform language code for your target language.</p>
    32 <itemgroup>
    32 <itemgroup>
    33 <p>The file naming suggestion reflects the Symbian platform convention, Symbian
    33 <p>The file naming suggestion reflects the Symbian platform convention,
    34 OS uses <parmname>&lt;application_name&gt;_NN.rls</parmname>.</p>
    34 Symbian platform uses <parmname>&lt;application_name&gt;_NN.rls</parmname>.</p>
    35 </itemgroup>
    35 </itemgroup>
    36 </li>
    36 </li>
    37 <li id="GUID-256733D4-214F-40E9-9DF1-E60469A8E8BD"><p>Define all
    37 <li id="GUID-256733D4-214F-40E9-9DF1-E60469A8E8BD"><p>Define all
    38 the symbolic IDs using the following syntax:</p>
    38 the symbolic IDs using the following syntax:</p>
    39 <codeblock id="GUID-5EBA1490-2538-4AFA-B348-8D12D0322820" xml:space="preserve">#define symbolicID "value in target language"</codeblock>
    39 <codeblock id="GUID-5EBA1490-2538-4AFA-B348-8D12D0322820" xml:space="preserve">#define symbolicID "value in target language"</codeblock>
    45 <li id="GUID-089BCEFD-8E83-4CAE-80C8-14461BC333DC"><p>Create a file
    45 <li id="GUID-089BCEFD-8E83-4CAE-80C8-14461BC333DC"><p>Create a file
    46 to include the compiled localization files in your resource file, as follows:</p>
    46 to include the compiled localization files in your resource file, as follows:</p>
    47 <ol>
    47 <ol>
    48 <li id="GUID-44F02DD4-1502-4BAB-B128-5FC570CB6ABC"><p>Create a text
    48 <li id="GUID-44F02DD4-1502-4BAB-B128-5FC570CB6ABC"><p>Create a text
    49 file with the extension <parmname>loc</parmname>.</p><p>The file naming
    49 file with the extension <parmname>loc</parmname>.</p><p>The file naming
    50 suggestion reflects the Symbian platform naming convention, Symbian OS uses <parmname>&lt;application_name&gt;.rls</parmname>.</p>
    50 suggestion reflects the Symbian platform naming convention, Symbian platform
    51 </li>
    51 uses <parmname>&lt;application_name&gt;.rls</parmname>.</p></li>
    52 <li id="GUID-D40E9CEB-031F-405A-B031-3B5DDB84C1B2"><p>Add <parmname>#ifdef</parmname>, <parmname>#elif</parmname>,
    52 <li id="GUID-D40E9CEB-031F-405A-B031-3B5DDB84C1B2"><p>Add <parmname>#ifdef</parmname>, <parmname>#elif</parmname>,
    53 and <parmname>#include</parmname> statements for including the appropriate
    53 and <parmname>#include</parmname> statements for including the appropriate
    54 languages in your application resource files. An example syntax is as follows:</p>
    54 languages in your application resource files. An example syntax is as follows:</p>
    55 <codeblock id="GUID-702C92E6-EEE5-4C0F-8498-8C182C0F0097" xml:space="preserve">#ifndef __LOCALIZATION_LOC__
    55 <codeblock id="GUID-702C92E6-EEE5-4C0F-8498-8C182C0F0097" xml:space="preserve">#ifndef __LOCALIZATION_LOC__
    56 #define __LOCALIZATION_LOC__
    56 #define __LOCALIZATION_LOC__
    57                             
    57                             
    58 #ifdef LANGUAGE_SC			// language code for default                                               
    58 #ifdef LANGUAGE_SC			// language code for default
    59 #include "..\data\localization.l01"
    59 #include "..\data\localization.l01"
    60 
    60 
    61 #elif LANGUAGE_01			// language code for UK
    61 #elif LANGUAGE_01			// language code for UK
    62 #include "..\data\localization.l01"
    62 #include "..\data\localization.l01"
    63 
    63 
    78 languages, so you may need to use the command line interface of the Symbian
    78 languages, so you may need to use the command line interface of the Symbian
    79 build chain.</p>
    79 build chain.</p>
    80 </note>
    80 </note>
    81 </li>
    81 </li>
    82 <li id="GUID-88D12169-4847-426C-A0AE-8107DE18183F"><p>Include the
    82 <li id="GUID-88D12169-4847-426C-A0AE-8107DE18183F"><p>Include the
    83 appropriate compiled resource files in your deployment package.</p><p>For
    83 appropriate compiled resource files in your deployment package.</p>
    84 more information on deploying, see <xref href="GUID-7369BBF7-5432-455D-BBB3-872D310358F2.dita"/>.</p>
       
    85 </li>
    84 </li>
    86 </ol>
    85 </ol>
    87 <p> The following localization strategies are available:</p>
    86 <p> The following localization strategies are available:</p>
    88 <ul>
    87 <ul>
    89 <li><p>Create an installation package for each language your application
    88 <li><p>Create an installation package for each language your application
    90 supports and add only the appropriate compiled resource file to the package</p>
    89 supports and add only the appropriate compiled resource file to the package.</p>
    91 </li>
    90 </li>
    92 <li><p>Create an installation package that includes support for
    91 <li><p>Create an installation package that includes support for
    93 more than one language, which means there is more than one compiled resource
    92 more than one language, which means there is more than one compiled resource
    94 file in the package. The mobile device user selects the desired language upon
    93 file in the package. The mobile device user selects the desired language upon
    95 installation, and only the compiled resource file is installed</p></li>
    94 installation, and only the compiled resource file is installed.</p></li>
    96 <li><p>Create an installation package that includes support for
    95 <li><p>Create an installation package that includes support for
    97 more than one language, which means there is more than one compiled resource
    96 more than one language, which means there is more than one compiled resource
    98 file in the package.</p></li>
    97 file in the package.</p></li>
    99 </ul>
    98 </ul>
   100 </conbody></concept>
    99 </conbody></concept>