I’m going to demonstrate how to make an application supports mutli-language at run time. In the following example I’ve used three language support, English, French and German.
Change the MMP file.
The first step is to make a modification in the MMP file. In the MMP file you can see one line like this:
As we are going to give support for three languages, English, French and German, the localization file extension should be l01, l02 and l03 respectively. You can put all the strings in this localization files.
Change the LOC file.
Now you have to change the LOC file below:
YourAppaif.rss should be like this to localize your application’s caption:
Over-ride ResourceFileName() function from CEikApplication to your CYourApplicationApp calss.
First of all you have to pass ENonStandardResourceFile for the function call of BaseConstructL() in your AppUi class’s ConstructL() function.
Changes in the PKG file
Put the following lines to your package file.
English language has been selected.
French language has been selected.
German language has been selected.
You can download the example application from here.
The sample application
Users of the S60 3rd Edition platform will find an updated version of the application here. |