首 页 | 新 闻 | Symbian | Windows Mobile| J2ME | 下载中心 | 游戏策划 | 购书指南 | 移动开发视频教程
您现在的位置: 开发视界 >> Symbian英文资料 >> Tips Tricks >> 文章正文
How to provide the Multi-Language support at runtime for Series 60.
作者:佚名    文章来源:newlc    更新时间:2007-1-5 18:48:11

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:

Replace that with the following line:

Create three localization files

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:

Change the YourAppAif.rss file

YourAppaif.rss should be like this to localize your application’s caption:

Change the class derived from CAknApplication

Over-ride ResourceFileName() function from CEikApplication to your CYourApplicationApp calss.

Changes required in the AppUi class

First of all you have to pass ENonStandardResourceFile for the function call of BaseConstructL() in your AppUi class’s ConstructL() function.

Next create the following new function in your AppUi class.

Now you can change the language of the application by calling ChooseLanguageL([LanguageIndex]) function.

Changes in the PKG file

Put the following lines to your package file.

Here are the sample images of the application.

(JPEG)
English language has been selected.
(JPEG)
French language has been selected.
(JPEG)
German language has been selected.

You can download the example application from here.

Zip - 28 kb
The sample application

Users of the S60 3rd Edition platform will find an updated version of the application here.

相关文章:
How to provide the Multi-Language support at runtime for Series 60.
Start automatically an application or an exe after its installation
How to install UIQ SDK for Metrowerks CodeWarrior and Borland C++BuilderX on a single machine
Starting APP and EXE applications
Start automatically an application or an exe after its installation
How to install UIQ SDK for Metrowerks CodeWarrior and Borland C++BuilderX on a single machine