Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



How to create an installation file for a multilingual application

Symbian OS supports different languages through the use of resource files. Each resource file contains, in a different language, the text used by the application (e.g. in menu options). The sis file bundles the resource files belonging to all languages, but only the file supporting the selected language is installed.

The process is:

  1. Create a text file with extension .pkg.

  2. Specify the languages that the application supports.

  3. Specify the package header. In a multilingual application this consists of the application’s name in each of the languages specified in the language line, in the order specified in the language line. As in all package files, it also includes the application’s UID, and its major, minor and build numbers.

  4. Specify the source location and names of files which should be always be installed, and their destination on the target machine.

  5. Specify the source location and name of the language resource files, in the same order as the language line. In the same block, specify the location to which only one of these files is to be installed, and the name of the file after installation.

  6. Invoke the Installation File Generator on the package file.


See also

Languages, How to create a simple installation file

[Top]


Example

The project file for a multilingual installation is provided in epoc32ex\ToolsAndUtilities\HelloWorldLangs.pkg. A listing of the file is given below:

&EN,FR,IT
#{"Minimal application", "Application minimale", "Applicazione minima"},(0x10004299),1,1,0,TYPE=SISAPP

"HelloWorld.app"-"!:\system\apps\HelloWorld\HelloWorld.app"

{
"HelloWorld.ruk"
"HelloWorld.rfr"
"HelloWorld.rit"
}-"!:\system\apps\HelloWorld\HelloWorld.rsc"

The first line uses language codes to specify the language variants which are supported — in this case English, French and Italian. This information is used by the installer. It also defines the order in which captions and language specific files should be specified.

The second line defines the package header. The text for “minimal application” is specified for each of the supported languages. The header also specifies the application’s UID (0x10004299), major and minor build numbers (1 , 0), the build number (0), and the installation type (SISAPP).

The third line specifies the source and destination location of the application file HelloWorld.app, which should be installed irrespective of the language selected by the user.

The final section specifies the source location of the three resource files to be bundled in the installation file. The order of the resource files should match the language codes given in the first line. The name and destination location of the single resource file to be installed is also specified in this section. As demonstrated, upon installation it must have the extension .rsc in order to link to the application file.

To create the installation file HelloWorldLangs.sis, invoke the Installation File Generator on the package file:

makesis HelloWorldLangs.pkg

[Top]


Notes