2015年8月4日 星期二

WINCE6.0 如何加入特殊國家的語系

以下是一些國家語系的locale identifiers (LCIDs)
越南語Vietnamese0x042a
格魯吉亞語Georgian0x0437

以下以越南語(0x042a)為範本。
1、請先確認您的Nlscfg.inf有無0x042a
located in the %_WINCEROOT%\Public\Common\Oak\Files directory

2將相關檔拷貝到Release目錄下
執行下Copy files to release directory
只要運行buildrel.bat$(_WINCEROOT)/PUBLIC/COMMON/OAK/MISC),
——打開命令列輸入buildrel.bat,執行完畢,再makeimg
 
3、依照以下的方式操作
a、在Project功能表選擇xxx Property…在彈出的對話方塊中點擊左邊的Configuration Properties點擊Locale裡選擇需要支援的語言,並選擇預設的語言。
b、在"Catalog Item View"中選擇支援MUI的組件,選擇"Core OS"->"CEBASE"->"International"->"Multilingual User Interface(MUI)",並添加對應的字形檔和輸入法元件。


c、在Project功能表選擇xxx Property…在彈出的對話方塊中點擊左邊的Configuration Properties然點後點擊 Custom Build Actions。在右邊的Build step下拉清單中選擇Pre-Make Image,點擊Net…按鈕輸入createmui 0409, 0x042a 0409表示英語,0x042a表示越南文(Viet Nam),如果還需要其它語言增加對應的語言檢索碼。可以在PB的幫助文檔裡National Language Support (NLS) > National Language Support (NLS) Reference > National Language Support (NLS) Locale Identifiers >查到每種語言對應的檢索碼。
d、重新生成(Clean Sysygen)工程
完成後打開工程的release目錄找到MultiUI.bib文件將MultiUI.bib檔的內容自製到platform.bib的未尾。並將其中包含k.coredll.dll.DLL.mui兩項刪除。
直接在platform.bib的未尾加上#include $(_FLATRELEASEDIR)\MultiUI.bib就行了,不需要手工去複製MultiUI.bib的內容到platform.bib這樣每次直接Clean Sysygen就行了。

e、重新Make run-time image。把nk.bin燒進設備裡去,在控制台的區域語言設置那裡選擇語言重起設備後就可以切換語言了。


Note
Configuring NLS Tables

The National Language Support (NLS) tables describe the locale identifiers (LCIDs) available to your OS design. An LCID consists of a primary language identifier, a sublanguage identifier, and a sort identifier. Platform Builder uses the LCIDs in your NLS table to determine which locales to support in your OS design. You can modify the NLS table to add or remove locale information. Platform Builder stores the list of OSsupported locales in the Nlscfg.inf file located in the %_WINCEROOT%\Public\Common\Oak\Files directory. The Nlscfg.inf file also includes the LOC_INCLUDELOCALES token. By default, Nlscfg.inf loads many of the locales supported by the 1252 code page.

You can add an LCID to the NLS table to support specific locales. And, you can remove an LCID from the NLS table to reduce the size of the file that Windows Embedded CE uses to store all the locale tables in ROM.

Once you determine which locales to include with your target device, you can set your OS to load a specific locale automatically during the boot process. You can also use the IDE to localize an OS design during the build process, or to set the locale later in the <OS design> Property Pages dialog box. If necessary, you can override the default code pages by using registry settings.

042a 這個值沒有規定如何加 ?
請參考以下的資料
Configuring the NLS Table (Windows Embedded CE 6.0)

The National Language Support (NLS) tables describe the locale identifiers (LCIDs) available to your OS design. An LCID consists of a primary language identifier, a sublanguage identifier, and a sort identifier. Platform Builder uses the LCIDs in your NLS table to determine which locales to support in your OS design. You can modify the NLS table to add or remove locale information. Platform Builder stores the list of OSsupported locales in the Nlscfg.inf file located in the %_WINCEROOT%\Public\Common\Oak\Files directory. The Nlscfg.inf file also includes the LOC_INCLUDELOCALES token. By default, Nlscfg.inf loads many of the locales supported by the 1252 code page.
You can add an LCID to the NLS table to support specific locales. And, you can remove an LCID from the NLS table to reduce the size of the file that Windows Embedded CE uses to store all the locale tables in ROM.
Once you determine which locales to include with your target device, you can set your OS to load a specific locale automatically during the boot process. You can also use the IDE to localize an OS design during the build process, or to set the locale later in the <OS design> Property Pages dialog box. If necessary, you can override the default code pages by using registry settings.



沒有留言:

張貼留言