diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-9D5F3B5E-37FB-5156-808B-F92519412A7F.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-9D5F3B5E-37FB-5156-808B-F92519412A7F.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,162 @@ + + + + + +Language +Dependent Files

The text and the images that are required to be localized, must +be defined in language-specific resource and icon files. You must specify +the filenames and path of the resource files in the PKG file, +for the resource files to be installed on the Symbian device. Based on the +parameters specified in the PKG file, the resource files +that are specific to the supported languages on the Symbian device are installed +or the resource files for the language selected by the Symbian device user +are installed.

This section explains the ways of specifying resource +files, based on the requirement for installing resource files for languages +supported on the Symbian device, or language selected by the Symbian device +user, during installation.

+
Specific to +the languages supported by the Symbian device

Specify each of +the language-specific resource files within an IF conditional block and set +the SUPPORTED_LANGUAGE parameter to a TLanguage numerical value, as shown in the following code snippet:

+if supported_language=01 + "HelloWorld.r01" -"!: \ resource\apps\HelloWorld.r01" +endif + +if supported_language=02 + "HelloWorld.r02" -"!: \ resource\apps\HelloWorld.r02" +endif

During installation, the languages supported by the Symbian +device are matched with the languages supported in the SIS file. The result +is based on the following two conditions:

    +
  • If an exact match is +found, the files corresponding to that language are copied to the Symbian +device.

    For example, if the SIS file specifies UK English(01), French(02) +and Zulu(98), and the Symbian device supports only UK English(01) and French(02), +during installation, only the files related to UK English(01) and French(02) +are copied to the Symbian device. The files for Zulu(98) are not copied to +the Symbian device.

  • +
  • If an exact match is +not found for any of the device supported languages, the files for all equivalent +languages (supported by the SIS files) corresponding to each of the device +supported languages are copied to the Symbian device.

    For example, +if the SIS file supports UK English(01), French(02) and International English(47), +and the Symbian device supports only American English(10) then during installation, +as an exact match for American English is not found, the files for UK English +and International English (both equivalent match) are copied to the Symbian +device. See Equivalent +Languages Reference for a list of all language equivalents supported +by Symbian Foundation.

  • +

Important:

Language-specific resource files must +have filenames with language-specific extensions. For example, the resource +files for UK English(01) must have the filename as Filename.r01.

If +you use the .rsc file extension, as shown in the following +code snippet, and if both the languages are supported on the Symbian device, +the resource files of UK English(01) are overwritten by resource files of +French (02) language during installation.

+if supported_language=01 //UK English + "HelloWorld.r01" -"!: \ resource\apps\HelloWorld.rsc" //do not use this extension format +endif + +if supported_language=02 //French + "HelloWorld.r02" -"!: \ resource\apps\HelloWorld.rsc" +endif
+
Specific to +the language selected by the Symbian device user

You can use one +of the following formats:

    +
  • Format1

  • +
  • Format2

  • +

Format1

Specify each of the language-specific resource +files within an IF conditional block and set the LANGUAGE parameter +to a TLanguage +numerical value, as shown in the following code snippet:

+if language=01 + "HelloWorld.r01" -"!: \ resource\apps\HelloWorld.r01" +endif + +if language=02 + "HelloWorld.r02" -"!: \ resource\apps\HelloWorld.r02" +endif

During installation, Symbian device user is prompted +to select a language. Based on the selection, the resource files for the selected +language are installed.

For example, if the SIS file specifies UK +English(01) and French(02), Symbian device user is prompted to select UK English +or French language for installation. Based on the selection, the resource +files for the selected language are copied to the Symbian device.

If +the Symbian device supports only one language, the resource files for only +that language are installed. In this scenario the Symbian device user is not +prompted to select a language for installation.

Format2

The +syntax is as follows:

{"source-filename1", "source-filename2", ...} - "destination-filename"[, install-options]

For example:

{ +"examples\HelloWorld\HelloWorld.ruk" +"examples\HelloWorld\HelloWorld.rfr" +"examples\HelloWorld\HelloWorld.rzu" +}-"!:\resource\apps\HelloWorld.rsc"

For a description of each +argument, see Language-Neutral +Files.

    +
  • The opening brace denotes +the start of the block of language-dependent files.

  • +
  • The order of the files +must be the same as the order in which the languages are specified in the +languages line.

  • +
  • The number of files +specified must be the same as the number of languages supported.

  • +
  • Install options can +be specified after the destination name, for example, FT to +display a language specific dialog.

  • +
  • Language dependent file +blocks, and other conditional blocks are evaluated at the end of the installation. +For example, the executables launched using FILERUN or FILEMIME statements +must not depend on conditionally installed or language-dependent files in +the same package file.

  • +

This format is commonly used to specify lists of resource files. +Resource files are installed to \resource\apps.

If +a resource file is to be accessed only by the application, it can be installed +to the application's private directory, \private\<process + SID>\. The SID (secure ID) is normally the same as the UID3, +which is specified in the MMP file.

An application +registration (resource) file is an exception. The applications built into +the ROM must provide their registration file in the z:\private\10003a3f\apps and +applications installed through Software Installer must locate their registration +file in \private\10003a3f\import\apps.

The +registration file in ROM must be located in z:\private\10003a3f\import\apps\ and +can be eclipsed.

Also, ECom registration resource files for ECom +plug-ins must be installed in \resource\plugins\.

+
Specific to +the languages supported by the Symbian device or language selected by Symbian +device user

Specify each of the language-specific resource files +within an IF conditional block and set the SUPPORTED_LANGUAGE and LANGUAGE parameters +to a TLanguage +numerical value separated by an OR condition, as shown +in the following code snippet:

+if supported_language=02 or language=02 + "HelloWorld.r01" -"!: \ resource\apps\HelloWorld.r01" +endif + +if supported_language=98 or language=98 + "HelloWorld.r98" -"!: \ resource\apps\HelloWorld.r98" +endif

Important: Language-specific resource files must +have filenames with language-specific extensions. For example, the resource +files for UK English(01) must have the filename as Filename.r01.

If +the SIS file does not include the Symbian device supported languages or its +equivalent, the Symbian device user is prompted to select a language. Based +on the selection, the files for the selected language are installed.

For +example, if the SIS file supports French(02) and Zulu(98), and the Symbian +device supports UK English(01) and German(03), the Symbian device user is +prompted to select French or Zulu language for installation. Based on the +selection, the files for the selected language are installed.

During +installation, if an exact or an equivalent language match is not found, the +Symbian device user is prompted to select a language. If you have not specified +the LANGUAGE parameter in PKG file, +as there is no resource file found for the selected language, no resource +files are installed. To avoid this, ensure that you always specify the LANGUAGE parameter +in the PKG file.
+
\ No newline at end of file