diff -r 80ef3a206772 -r 48780e181b38 Symbian3/SDK/Source/GUID-FC929B37-20E1-5DA7-91A7-CBBED2E69A6E.dita --- a/Symbian3/SDK/Source/GUID-FC929B37-20E1-5DA7-91A7-CBBED2E69A6E.dita Fri Jul 16 17:23:46 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-FC929B37-20E1-5DA7-91A7-CBBED2E69A6E.dita Tue Jul 20 12:00:49 2010 +0100 @@ -1,60 +1,50 @@ - - - - - -Getting -Equivalent and Nearest Equivalent Languages This section describes how to call functions of BaflUtils to -get an equivalent language list and a nearest equivalent language. -

This tutorial assumes that you have an understanding of the following -topics:

    -
  • Equivalent -Language Reference explains the equivalent language table, including -the equivalent language list and its priority.

  • -
  • About -Application Resources describes the purpose of resource files.

  • -
  • How -to Localize Resources describes language-neutral and language-dependent -resource files.

  • -
-

BaflUtils provides the following two static -functions to get the equivalent language list and a nearest equivalent language:

    -
  • GetEquivalentLanguageList(TLanguage aLang, TLanguagePath& aEquivalents)

    For a given language (TLanguage), it returns an array -(TLanguagePath) which contains the equivalent languages. -If no equivalent language is found, ELangNone is returned.

  • -
  • NearestLanguageFileV2(const RFs& aFs,TFileName& aName, TLanguage& aLanguage)

    A TLanguage value is used at the end of a resource -file name to identify a resource file for a language. For example, filename.r01 and filename.r02 are -the English and French versions of the filename.rsc resource -file.

    An application calls BaflUtils::NearestLanguageFileV2() to -determine which localized resource file is the closest to the current system -language. The function searches the following drives in the given sequence -for the available resource files, which have the same file name (without extension) -as aName. Once the resource files are searched on a drive, -the function stops searching on the next drive.

      -
    • The custom resource -drive if it is set using the HAL::ECustomResourceDrive attribute -or the legacy HAL::ESystemDrive attribute.

    • -
    • The optional drive if -it is specified in the aName parameter.

    • -
    • Z: drive -if the optional drive is not set in the aName parameter.

    • -

    The current system language is then taken as a given language. All -the available resource file names are prioritized according to the equivalent -language list. The resource file name with the highest priority is -returned.

  • -
- -Getting -an Equivalent Language List - -Getting -a Nearest Equivalent Language - - + + + + + +Getting Equivalent and Nearest Equivalent Languages This section describes how to call functions of BaflUtils to get an equivalent language list and a nearest +equivalent language. +

This tutorial +assumes that you have an understanding of Equivalent Language +Reference which explains the equivalent language table, including +the equivalent language list and its priority.

+

BaflUtils provides the following two static functions to +get the equivalent language list and a nearest equivalent language:

    +
  • GetEquivalentLanguageList(TLanguage aLang, TLanguagePath& aEquivalents)

    For a given language (TLanguage), it returns +an array (TLanguagePath) which contains the equivalent +languages. If no equivalent language is found, ELangNone is returned.

  • +
  • NearestLanguageFileV2(const RFs& aFs,TFileName& aName, TLanguage& aLanguage)

    A TLanguage value is used at the end of a +resource file name to identify a resource file for a language. For +example, filename.r01 and filename.r02 are the English and French versions of the filename.rsc resource file.

    An application calls BaflUtils::NearestLanguageFileV2() to determine which localized resource file is the closest to the +current system language. The function searches the following drives +in the given sequence for the available resource files, which have +the same file name (without extension) as aName. +Once the resource files are searched on a drive, the function stops +searching on the next drive.

      +
    • The custom resource +drive if it is set using the HAL::ECustomResourceDrive attribute or the legacy HAL::ESystemDrive attribute.

    • +
    • The optional +drive if it is specified in the aName parameter.

    • +
    • Z: drive if the optional drive is not set in the aName parameter.

    • +

    The current system language is then taken as a given language. +All the available resource file names are prioritized according to +the equivalent +language list. The resource file name with the highest priority +is returned.

  • +
+ +Getting an Equivalent +Language List + +Getting a Nearest +Equivalent Language + +
\ No newline at end of file