How do I compile non-Latin Symbian resource files?
Article Metadata
Compatibility
S60 2nd Edition and FP1, FP2, FP3
S60 3rd Edition
Article
Contents |
Overview
How do I compile non-Latin resource files?
Description
When creating localized versions of your application, you may need to build the resource file using strings with non-Latin characters (for example, Chinese). To achieve this, do as follows:
- Create your resource file and add the CHARACTER_SET UTF8 statement.
- Save the files in UTF8 format. If the editor allows you to save the file as UTF8 without BOM ("byte order mark"), you can skip the next step.
- Use a hexadecimal editor to remove the BOM from the saved resource file (for UTF8 the BOM is 3 bytes long with the following hexadecimal content: EF BB BF).
Example:
File: ChineseDisplay.loc
============================
CHARACTER_SET UTF8
#ifdef LANGUAGE_01
#include "Language.l01"
#endif
#ifdef LANGUAGE_31
#include "Language.l31"
#endif
============================
File: language.l01
============================
#define ELanguage ELangEnglish
… snip ...
#define qtn_exit "Exit"
#define qtn_test "Test"
#define qtn_hello "Hello"
… snip ...
============================
File: language.l31
============================
#define ELanguage ELangPrcChinese
… snip ...
#define qtn_exit "退出"
#define qtn_test "测试"
#define qtn_hello "ä½ å¥½"
… snip ...
============================
File: ChineseDisplay.rss
============================
NAME CHID
CHARACTER_SET UTF8
RESOURCE RSS_SIGNATURE { }
RESOURCE TBUF { buf=""; }
RESOURCE EIK_APP_INFO
{
menubar=r_ChineseDisplay_menubar;
cba=R_AVKON_SOFTKEYS_OPTIONS_EXIT;
}
… snip …
RESOURCE MENU_PANE r_ChineseDisplay_menu
{
items=
{
MENU_ITEM { command=EAknCmdExit; txt=qtn_exit; },
MENU_ITEM { command=EChineseDisplayCmdTest; txt=qtn_test; },
MENU_ITEM { command=EChineseDisplayCmdHello; txt=qtn_hello; }
};
}
… snip ...


(no comments yet)