Symbian3/SDK/Source/GUID-FC929B37-20E1-5DA7-91A7-CBBED2E69A6E.dita
changeset 13 48780e181b38
parent 7 51a74ef9ed63
equal deleted inserted replaced
12:80ef3a206772 13:48780e181b38
     7     Nokia Corporation - initial contribution.
     7     Nokia Corporation - initial contribution.
     8 Contributors: 
     8 Contributors: 
     9 -->
     9 -->
    10 <!DOCTYPE task
    10 <!DOCTYPE task
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
    12 <task id="GUID-FC929B37-20E1-5DA7-91A7-CBBED2E69A6E" xml:lang="en"><title>Getting
    12 <task id="GUID-FC929B37-20E1-5DA7-91A7-CBBED2E69A6E" xml:lang="en"><title>Getting Equivalent and Nearest Equivalent Languages </title><shortdesc>This section describes how to call functions of <codeph>BaflUtils</codeph> to get an equivalent language list and a nearest
    13 Equivalent and Nearest Equivalent Languages </title><shortdesc>This section describes how to call functions of <codeph>BaflUtils</codeph> to
    13 equivalent language. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
    14 get an equivalent language list and a nearest equivalent language. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
    14 <prereq id="GUID-03EE02F1-492A-463A-A64B-9BA086897FAE"><p>This tutorial
    15 <prereq id="GUID-03EE02F1-492A-463A-A64B-9BA086897FAE"><p>This tutorial assumes that you have an understanding of the following
    15 assumes that you have an understanding of <xref href="GUID-10A50B7C-63DB-599B-86C1-17989595CBD2.dita">Equivalent Language
    16 topics: </p> <ul>
    16 Reference</xref> which explains the equivalent language table, including
    17 <li id="GUID-3AECC912-FD5E-5837-BB83-763A6536DA73"><p><xref href="GUID-10A50B7C-63DB-599B-86C1-17989595CBD2.dita">Equivalent
    17 the equivalent language list and its priority.</p> </prereq>
    18 Language Reference</xref> explains the equivalent language table, including
    18 <context id="GUID-11BBC0DD-7E59-423E-81C3-39FA5E5943C4"><p> <xref href="GUID-5F9CAA3E-D8BF-3488-9797-3B9FB4452930.dita"><apiname>BaflUtils</apiname></xref> provides the following two static functions to
    19 the equivalent language list and its priority. </p> </li>
    19 get the equivalent language list and a nearest equivalent language: </p> <ul>
    20 <li id="GUID-BA05E8FE-F6CB-51CE-BA16-39D95631F533"><p><xref href="GUID-28227926-2D5A-500C-B2BC-0EE6CC077DBE.dita">About
    20 <li id="GUID-42B035C0-34C1-585E-8195-B317C694018C"><codeblock id="GUID-0686FF33-BE2D-597C-8CC7-422AE32F1554" xml:space="preserve">GetEquivalentLanguageList(TLanguage aLang, TLanguagePath&amp; aEquivalents)</codeblock> <p>For a given language (<xref href="GUID-698538DF-DCDC-347B-BD32-DD9EB896BAFB.dita"><apiname>TLanguage</apiname></xref>), it returns
    21 Application Resources</xref> describes the purpose of resource files. </p> </li>
    21 an array (<xref href="GUID-2533E3D6-D0D8-3638-847D-C5DED07557BD.dita"><apiname>TLanguagePath</apiname></xref>) which contains the equivalent
    22 <li id="GUID-17BB5D28-C2F7-5B8F-A2AE-36CE1ED04B42"><p><xref href="GUID-F35C5336-907C-5B2A-92C6-F8883D49996E.dita">How
    22 languages. If no equivalent language is found, <codeph>ELangNone</codeph> is returned. </p> </li>
    23 to Localize Resources</xref> describes language-neutral and language-dependent
    23 <li id="GUID-B2CBF4AA-9F96-59E7-BBD1-C069FEF0EACD"><codeblock id="GUID-6C39809C-E824-52B1-8E87-6EE36F333E4D" xml:space="preserve">NearestLanguageFileV2(const RFs&amp; aFs,TFileName&amp; aName, TLanguage&amp; aLanguage)</codeblock> <p>A <xref href="GUID-698538DF-DCDC-347B-BD32-DD9EB896BAFB.dita"><apiname>TLanguage</apiname></xref> value is used at the end of a
    24 resource files. </p> </li>
    24 resource file name to identify a resource file for a language. For
    25 </ul> </prereq>
    25 example, <filepath>filename.r01</filepath> and <filepath>filename.r02</filepath> are the English and French versions of the <filepath>filename.rsc</filepath> resource file. </p> <p>An application calls <codeph>BaflUtils::NearestLanguageFileV2()</codeph> to determine which localized resource file is the closest to the
    26 <context id="GUID-11BBC0DD-7E59-423E-81C3-39FA5E5943C4"><p> <xref href="GUID-5F9CAA3E-D8BF-3488-9797-3B9FB4452930.dita"><apiname>BaflUtils</apiname></xref> provides the following two static
    26 current system language. The function searches the following drives
    27 functions to get the equivalent language list and a nearest equivalent language: </p> <ul>
    27 in the given sequence for the available resource files, which have
    28 <li id="GUID-42B035C0-34C1-585E-8195-B317C694018C"><codeblock id="GUID-0686FF33-BE2D-597C-8CC7-422AE32F1554" xml:space="preserve">GetEquivalentLanguageList(TLanguage aLang, TLanguagePath&amp; aEquivalents)</codeblock> <p>For a given language (<xref href="GUID-698538DF-DCDC-347B-BD32-DD9EB896BAFB.dita"><apiname>TLanguage</apiname></xref>), it returns an array
    28 the same file name (without extension) as <codeph>aName</codeph>.
    29 (<xref href="GUID-2533E3D6-D0D8-3638-847D-C5DED07557BD.dita"><apiname>TLanguagePath</apiname></xref>) which contains the equivalent languages.
    29 Once the resource files are searched on a drive, the function stops
    30 If no equivalent language is found, <codeph>ELangNone</codeph> is returned. </p> </li>
    30 searching on the next drive. </p> <ul>
    31 <li id="GUID-B2CBF4AA-9F96-59E7-BBD1-C069FEF0EACD"><codeblock id="GUID-6C39809C-E824-52B1-8E87-6EE36F333E4D" xml:space="preserve">NearestLanguageFileV2(const RFs&amp; aFs,TFileName&amp; aName, TLanguage&amp; aLanguage)</codeblock> <p>A <xref href="GUID-698538DF-DCDC-347B-BD32-DD9EB896BAFB.dita"><apiname>TLanguage</apiname></xref> value is used at the end of a resource
       
    32 file name to identify a resource file for a language. For example, <filepath>filename.r01</filepath> and <filepath>filename.r02</filepath> are
       
    33 the English and French versions of the <filepath>filename.rsc</filepath> resource
       
    34 file. </p> <p>An application calls <codeph>BaflUtils::NearestLanguageFileV2()</codeph> to
       
    35 determine which localized resource file is the closest to the current system
       
    36 language. The function searches the following drives in the given sequence
       
    37 for the available resource files, which have the same file name (without extension)
       
    38 as <codeph>aName</codeph>. Once the resource files are searched on a drive,
       
    39 the function stops searching on the next drive. </p> <ul>
       
    40 <li id="GUID-8BD6E006-7369-559A-AD7E-7192E7F2C400"><p>The custom resource
    31 <li id="GUID-8BD6E006-7369-559A-AD7E-7192E7F2C400"><p>The custom resource
    41 drive if it is set using the <codeph>HAL::ECustomResourceDrive</codeph> attribute
    32 drive if it is set using the <codeph>HAL::ECustomResourceDrive</codeph> attribute or the legacy <codeph>HAL::ESystemDrive</codeph> attribute. </p> </li>
    42 or the legacy <codeph>HAL::ESystemDrive</codeph> attribute. </p> </li>
    33 <li id="GUID-E361606A-6E26-5E25-9C0E-429047947BB4"><p>The optional
    43 <li id="GUID-E361606A-6E26-5E25-9C0E-429047947BB4"><p>The optional drive if
    34 drive if it is specified in the <codeph>aName</codeph> parameter. </p> </li>
    44 it is specified in the <codeph>aName</codeph> parameter. </p> </li>
    35 <li id="GUID-D905BA6F-72BE-535E-8225-0018F08E4EAB"><p> <filepath>Z:</filepath> drive if the optional drive is not set in the <codeph>aName</codeph> parameter. </p> </li>
    45 <li id="GUID-D905BA6F-72BE-535E-8225-0018F08E4EAB"><p> <filepath>Z:</filepath> drive
    36 </ul> <p>The current system language is then taken as a given language.
    46 if the optional drive is not set in the <codeph>aName</codeph> parameter. </p> </li>
    37 All the available resource file names are prioritized according to
    47 </ul> <p>The current system language is then taken as a given language. All
    38 the <xref href="GUID-10A50B7C-63DB-599B-86C1-17989595CBD2.dita">equivalent
    48 the available resource file names are prioritized according to the <xref href="GUID-10A50B7C-63DB-599B-86C1-17989595CBD2.dita">equivalent
    39 language list</xref>. The resource file name with the highest priority
    49 language list</xref>. The resource file name with the highest priority is
    40 is returned. </p> </li>
    50 returned. </p> </li>
       
    51 </ul> </context>
    41 </ul> </context>
    52 <steps-unordered>
    42 <steps-unordered>
    53 <step id="GUID-66A7C747-5484-4BAE-9FCD-A6ECF136DF0F"><cmd><xref href="GUID-A6A6BC5B-4988-45B4-863D-0E3733B77EA2.dita">Getting
    43 <step id="GUID-66A7C747-5484-4BAE-9FCD-A6ECF136DF0F"><cmd><xref href="GUID-A6A6BC5B-4988-45B4-863D-0E3733B77EA2.dita">Getting an Equivalent
    54 an Equivalent Language List</xref></cmd>
    44 Language List</xref></cmd>
    55 </step>
    45 </step>
    56 <step id="GUID-A1A4F1ED-DD97-4386-81EB-D41033DA1725"><cmd><xref href="GUID-DDA0ECF7-BC92-4AFB-998F-5FDD300655FB.dita">Getting
    46 <step id="GUID-A1A4F1ED-DD97-4386-81EB-D41033DA1725"><cmd><xref href="GUID-DDA0ECF7-BC92-4AFB-998F-5FDD300655FB.dita">Getting a Nearest
    57 a Nearest Equivalent Language</xref></cmd>
    47 Equivalent Language</xref></cmd>
    58 </step>
    48 </step>
    59 </steps-unordered>
    49 </steps-unordered>
    60 </taskbody></task>
    50 </taskbody></task>