How resource files work

In the S60 platform, resource files are used to define UI components used in applications. The UI components consist of data structures that are defined in resource files, and then are loaded by the classes controlling the UI implementation. When UI component implementation is split into these two approaches, it means that resources can be recompiled, for example for new languages, without having to recompile the application code (unless you change the resource identifiers).

The following resource files are typically used as source files in S60 applications:

The structures and symbolic IDs of these files are used in various ways in your code.

The resource files above are then compiled to yield the following files:

  • .rsc or rNN, where NN is a two number S60 locale ID - compiled, machine-readable resource files used by the application

  • .rsg - generated resource header file containing the symbolic IDs of the resources for inclusion into your code

  • _reg.rsc or _reg.rNN, where NN is a two number S60 locale ID - compiled, machine-readable resource file used for registration

The rsc, rNN, and _reg.rsc files need to be included in your sis installation file so that they are placed in the device when the application is installed.

When the application framework launches an application, it loads the application resource file. The application framework compares the system locale language setting with the available resource files, and loads the resource file whose extension matches the locale language code. If there is no match, then the system loads the resource file with the extension rsc.