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:
Create a text file with extension .pkg
.
Specify the languages that the application supports.
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.
Specify the source location and names of files which should be always be installed, and their destination on the target machine.
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.
Invoke the Installation File Generator on the package file.
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
There are a number of concepts in the file which are explained in the “How To” for a simple installation (e.g. UID, Build number, comments). See this topic for more information.
The SISAPP type information specified in the package header is redundant, as installation of an application is the default.
The Add/Remove program allows users to set their preferred language. The files for this preferred language are automatically installed if they are available in the installation file. If the files for the preferred language not available, then the user is prompted to select which language to install.