Building a Localized Platform in Microsoft Windows CE Platform Builder 3.0

Microsoft Corporation

June 2000

Summary: This document walks you through building a platform for a specific international market or locale using Microsoft Windows CE Platform Builder 3.0. (22 printed pages)

Contents

Introduction Binary Resource Files Localizing Configuration Files Localizing Project and Platform Files Configuring NLS Tables Selecting Code Pages Week Number Implementation Localizing UI Elements Localizing the Currency Symbol Localizing for East Asian Locales

Introduction

You can use Microsoft® Windows® CE 3.0 Platform Builder to build a platform for a specific international market or locale. Before you can localize a platform, you need to create it, using either the Platform Wizard or the Command Line tools. After you have built the source code for your completed platform, you can select a specific locale for that image, and, once it is localized, you can build and test it.

Platform Builder enables you to localize the following elements of a platform:

  • Binary resource (.res) files
  • Configuration files
  • Project and platform files
  • Code pages
  • UI elements
  • National Language Support (NLS) files
  • Currency symbols
  • Locale

When you have verified that the localized .res files and configuration files are in the appropriate directories, and have localized other elements of your operating system (OS), you are ready to build a localized OS image. Before you begin, verify that the default code page for the selected locale is installed on the computer you use to build the OS image so the necessary strings can be translated from ANSI to UNICODE.

During the build process, you can choose between non-strict localization and strict localization.

  • Non-strict localization does not require all of the .res files to be available when the OS image is created by the Make Binary Image tool (Makeimg.exe). If a .res file is missing, Platform Builder will use the U.S. resource and generate a warning. You can use non-strict localization during the debug process to test individual modules and components without having to localize all of the .res files.
  • Strict localization requires all .res files to be available during the Makeimg.exe phase. When strict localization is in effect, Platform Builder will generate an error if the localization process fails to localize a module. Further, if you do not localize a module, the build process will not create an OS image.

You can turn localization on or off during the build process.

Note that there are two types of procedures listed in this paper. Integrated development environment (IDE) procedures are done from inside the IDE and command line procedures are done from the command line.

IDE Procedures

To build a localized OS image

  1. On the Platform menu, click Settings.
  2. On the General tab, select the locale from the Country list.
  3. On the Build menu, select Build Platform.

Command-Line Procedures

To build a localized OS image

  1. Select the corresponding locale code from the locale code reference.

  2. In the command prompt window, set the COUNTRY environment variable to the selected locale.

    Most locale names use the standard three-letter naming convention.

  3. Run the Master Build tool (Cebuild.bat).

To toggle the localization process on or off during the Makeimg.exe phase

  1. Define the IMGNOLOC environment variable.
  2. Set IMGNOLOC to 1 to turn off localization.
    or Set IMGNOLOC to 0 to turn on localization.

To force Makeimg.exe to localize the modules again

  • Delete Prevctry.txt from the directory identified with the %_FLATRELEASEDIR% environment variable.

    If you do not alter the COUNTRY environment variable before running Makeimg.exe again, Makeimg.exe does not localize the modules again before creating a new OS image.

To specify strict or non-strict localization

  • Set the IMGSTRICTLOC environment variable to 1 to specify strict localization.
    or
  • Set IMGSTRICTLOC to 0 to specify non-strict localization.

Binary Resource Files

A .res file contains strings, graphics, and other resources that Windows CE OS uses to interact with you. During the build process, you can select which localized .res files to include in your OS image. Platform Builder automatically supports certain locales and includes localized .res files for these locales. Currently, Platform Builder contains localized .res files for Dutch, French, German, Italian, Japanese, Korean, Portuguese (Brazil), Spanish (Traditional), and Swedish.

During the build process, when running the Sysgen tool (Sysgen.bat), Platform Builder propagates the .res files to a project-specific directory: %_WINCEROOT%\Public\Project\Cesysgen\Oak\Target\CPUFamily\CPU\Ce\{Retail or Debug}\Locale. During the build process, Platform Builder copies the .res files to the %_FLATRELEASEDIR%\Locale directory. Makeimg.exe retrieves the .res files from %_FLATRELEASEDIR%\Locale and merges the .res files into the appropriate module based on information retrieved from the Common.loc, Platform.loc, and Project.loc files.

The Common.loc file contains a list of OS-specific files that will be localized during the Makeimg.exe process. Platform Builder generates Common.loc during the Sysgen.bat phase. Do not add project-specific localization requirements to Common.loc.

In order for localization to be successful, for each module that you want to localize, there must be a localized .res file with the same name in the %_WINCEROOT%\Public\Common\Oak\Lib\CPUFamily\CPU\Ce\{Retail or Debug}\Locale directory and a file with the same name listed in the .loc files. For example, for the CEPC platform, Platform Builder provides the Pcmcia.res file for the Pcmcia.dll module and the Platform.loc file that lists a file with the same name as the module. The path for the Platform.loc file is %_WINCEROOT%\Platform\CEPC\Files directory. The path for the Pcmcia.res file is %_WINCEROOT%\Public\Common\Oak\Lib\CPUFamily\CPU\Ce\{Retail or Debug}\Locale directory.

If you are not using a locale that Platform Builder automatically supports, you need to localize the .res files for the locale and place the files in a directory specified in the locale code table. For each COUNTRY code, there is a specified directory where the localized .res files are located. The path for the .res files is %_WINCEROOT%\Public\Common\Oak\Lib\CPUFamily\CPU\Ce\{Retail or Debug}\Locale. For example, if %_WINCEROOT% is C:\Wince300 and you are using the SH3 microprocessor, you would place the .res files for the Basque locale in the C:\Wince300\Public\Common\Oak\Lib\Shx\Sh3\Ce\Retail\Euq directory.

Regardless of whether or not you are using a locale that Platform Builder supports, you may also need to place localized .res files in the following directories depending on the OS configuration you are using:

  • %_WINCEROOT%\Public\Dcom
  • %_WINCEROOT%\Public\Ie
  • %_WINCEROOT%\Public\Msmq
  • %_WINCEROOT%\Public\Script
  • %_WINCEROOT%\Public\Wceshellfe
  • %_WINCEROOT%\Public\Wceappsfe

For example, if you are adding a locale to the WCESHELLFE directory, the path for the .res files is %_WINCEROOT%\Public\WCESHELLFE \Oak\Lib\CPUFamily\CPU\Ce\{Retail or Debug}\Locale directory.

When a new locale is added, a full build is required to propagate the .res files to the correct locations.

Note   The file allocation table (FAT) file system uses the term Storage Card to identify a mounted drive. In some targeted products, such as the Handheld PC (H/PC) category of devices, Storage Card has not been localized to a particular locale. If you must use the non-localized version of Storage Card on your platform for backwards compatibility, you can change the string resource number 1 in the Filesys.res string table.

Localizing Configuration Files

A configuration file is an ANSI file that contains operating specifications for the hardware and software on your target device. The following table shows the types of configuration files that you can localize for a release configuration.

File name extension Description
.reg Registry file
.db Database file
.bib Binary image builder file
.ini Initialization file
.dat File system file
.inf Input file

As with .res files, these configuration files can be localized for each locale. Platform Builder includes localized configuration files for the locales that it automatically supports. For the locales that Platform Builder does not automatically support, or to add new values that must be localized, you must localize the associated string replacement (.str) file. An .str file is an ANSI file that consists of localized string resources that are identified by a defined name or token. Once you localize the .str file, Platform Builder places the string resources into the configuration files during the Makeimg.exe phase of the build process.

The .str file that is directly associated with the OS is Common.str. It is located in the %_WINCEROOT%\Public\Common\Oak\Files\Intltrns\Locale directory; the locale is determined by the COUNTRY environment variable. Platform Builder includes platform-specific and project-specific .str files in the %_WINCEROOT%\Public\Platform\Oak\Files\Intltrns\Locale and %_WINCEROOT%\Public\Project\Oak\Files\Intltrns\Locale directories. Project.str and Platform.str files can override the Common.str translations or add new project-specific and platform-specific translations. Platform Builder also includes .str files in the following directories:

  • %_WINCEROOT%\Public\Wceshellfe\Oak\Files\Intltrns\Locale
  • %_WINCEROOT%\Public\Wceappsfe\Oak\Files\Intltrns\Locale
  • %_WINCEROOT%\Public\Ie\Oak\Files\Intltrns\Locale

The following restrictions apply to .str files:

  • Only lines that begin with #define are processed by Makeimg.exe.

  • Makeimg.exe searches for all .str files by using FindFirstFile/FindNextFile, merges the contents, and then replaces previous definitions before performing any replacement.

  • Strings that are a maximum of 4 KB can be specified at any one time.

  • The maximum amount of string-related information is restricted to 64 KB.

  • The .str file format is similar to a C header, but it does not directly relate to C programming. Therefore, an .str file does not support general C pre-processor syntax.

  • Verify that each line in your .str file ends with a carriage return (<CR>). Also, verify that there are no spaces between the end of the line and the carriage return (<CR>).

    Note   When creating strings in an .str file, you must use quotation marks to define the string. If necessary, you can strip out the quotation marks during the build process.

Command-Line Procedures

To localize a configuration file

  1. Create your configuration files by using unique tokens in place of the values to localize.

    By convention, the token is commonly LOC_*.

    The following code example shows how to use the LOC_FRIENDLYHAYESCOMPAT token in a Common.reg file.

    [HKEY_LOCAL_MACHINE\ExtModems\HayesCompat]
      "Port"="COM1:"
      "DeviceType"=dword:1
      "FriendlyName"=LOC_FRIENDLYHAYESCOMPAT
    
  2. Create your .str files to include localized strings for all of the LOC_* values that you created in your configuration files.

    If you do not create localized strings for all LOC_* values, Platform Builder will return an error during the Makeimg.exe process.

    The following code example shows how to define the LOC_FRIENDLYHAYESCOMPAT token in an .str file.

    // Common.reg translations
    #define LOC_FRIENDLYHAYESCOMPAT "Hayes Compatible on COM1:"
    

    The next time you run Makeimg.exe, Platform Builder replaces LOC_FRIENDLYHAYESCOMPAT in Common.reg with "Hayes Compatible on COM1:".

To strip quotation marks from an .str file

  1. Place the tilde (~) in your LOC_* definition between the LOC_* token name and the string that the LOC_* token represents. For example:

    //Common.str
    #define LOC_LCID ~"409"
    
  2. Use the LOC_* token as you would normally. For example:

    //Common.reg
    [HKEY_LOCAL_MACHINE\nls]
      "DefaultLCID" = dword:LOC_LCID
    
  3. Run Makeimg.exe.

    During the build process, Platform Builder strips the quotation marks from the LOC_* token.

    The following code example shows how the Common.reg file appears after integration with the Common.str file.

    "DefaultLCID" = dword:409
    

Localizing Project and Platform Files

In addition to localizing .res and .str files provided by the OS, you can add project-specific or platform-specific files that require localization during the Makeimg.exe phase. During the Makeimg.exe phase, Platform Builder enumerates all .loc files in order to localize the OS and its components. The Windows CE PC-based hardware development platform (CEPC) Maxall configuration that is included with Platform Builder is an example of a localized project.

When you create a project.loc file or platform.loc file, you need to add the names of the modules that require localization, excluding the file extension .dll, .cpl, or .exe, add the corresponding .res files to the correct locale directory, and then verify that the prefix for the .res file matches the module that Platform Builder will be localizing.

Command-Line Procedures

To create project files in the correct directory

Use this procedure for projects that have resources that can be localized and that need to make use of the OS localization process.

  • Place the localized .res files for each module for each supported locale in %_WINCEROOT%\Public\MyProject\Oak\Target\CPUFamily\CPU\Ce\{Retail or Debug}\Locale.

To create platform files in the correct directory

  • Place the localized .res files for all locales in %_WINCEROOT%\Platform\MyPlatform\Target\CPUFamily\CPU\Ce\{Retail or Debug}\Locale.

To add project-specific or platform-specific files during the Makeimg.exe phase

  1. Create a Project.loc or Platform.loc file in the Platform or Project directory. For example:

    \Public\Project\Oak\Files\Project.loc 
    

    or

    \Platform\Platform\Files\Platform.loc
    

    This is the same process that is required to create project-specific or platform-specific .reg, .bib, or .dat files. The prefix name does not matter. However, you must use the .loc extension.

  2. Add the names of the modules, excluding the .exe or .dll extension, that require localization during the Makeimg.exe phase to your newly created Project.loc or Platform.loc file.

    Note   The Msim.res file has been localized for all supported locales; however, during the build process the U.S. resources of the Msim component are not replaced. To have these resources localized, add the MSIM component to Project.loc.

Configuring NLS Tables

The NLS tables describe the locale identifiers (LCIDs) available to your platform. An LCID consists of a primary language identifier, a sub-language identifier, and a sort identifier. Platform Builder uses the LCIDs in your NLS table to determine which locales to support in your platform. You can modify the NLS table to add or remove locale information. Platform Builder stores the list of OS-supported 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, the OS is configured to load the following locales that are listed in the Nlscfg.inf file:

0403 0406 0407 0807 0c07 1007 1407 0409 0809 0c09 1009 1409 1809 1c09
2009 2409 2809 2c09 040a 080a 0c0a 100a 140a 180a 1c0a 200a 240a 280a
2c0a 300a 340a 380a 3c0a 400a 440a 480a 4c0a 500a 040b 040c 080c 0c0c
100c 140c 0410 0810 0413 0813 0414 0814 0416 0816 041d 081d 042d

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 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. If necessary, you can override the default code pages by using registry settings.

Command-Line Procedures

To add an LCID to the NLS table

  • Specify the new locales in the Common.str file. For example:

    // Common.str 
    // This string gets inserted in Nlscfg.inf 
    #define LOC_INCLUDELOCALES ~"411 412"
    

To remove an LCID from the NLS table

  • Remove the LCID from Nlscfg.inf.

To have the default locale automatically set when the OS initializes

  • Define LOC_LCID in your Common.str file, and then set LOC_LCID to your default LCID. Do not set LOC_LCID in Common.reg. For example, to set LOC_LCID to the 409 LCID:

    //Common.str
    #define LOC_LCID ~"409"
    

    When LOC_LCID is set to the default LCID, a registry value is set for the default locale. For example:

    [HKEY LOCAL MACHINE\nls]
    "DefaultLCID" = dword:LOC_LCID
    

    The specified default locale has to be listed in the Nlscfg.inf file in order for the build to boot.

To override default code pages

  • Add registry settings to the Project.reg file. For example:

    [HKEY_LOCAL_MACHINE\nls]
      "DefaultOCP" = dword:<OEM Codepage>
      "DefaultACP" = dword:<ANSI Codepage>
    

    The OEM and ANSI code pages must be added to the OS image.

    Note If you want to automate the setting of the registry keys, you can add tokens to your .str files.

Selecting Code Pages

A code page is a translation table that the Windows CE OS uses to enable conversions from ANSI to Unicode. By default, the Windows CE OS enables code page support based on the locales that are built into the OS image. Each installed locale has exactly one ANSI-supported code page and one original equipment manufacturer (OEM)–supported code page. When Windows CE changes a locale, it also changes the default ANSI and OEM code pages to match the new locale. Windows CE associates code pages with a given locale based on the code pages that are available in your system. In some circumstances, the default set of code pages may not provide all of the required support. You can add additional code pages to a platform for additional support, but you cannot download code pages to a target device.

The following table shows the code pages supported by Windows CE.

Code page Description
437 MS-DOS United States
708 Arabic (ASMO 708)
709 Arabic (ASMO 449+, BCON V4)
710 Arabic (Transparent Arabic)
720 Arabic (Transparent ASMO)
737 Greek (formerly 437G)
775 Baltic
850 MS-DOS Multilingual (Latin I)
852 MS-DOS Slavic (Latin II)
855 IBM Cyrillic (primarily Russian)
857 IBM Turkish
860 MS-DOS Portuguese
861 MS-DOS Icelandic
862 Hebrew
863 MS-DOS Canadian-French
864 Arabic
865 MS-DOS Nordic
866 MS-DOS Russian (former USSR)
869 IBM Modern Greek
874 Thai
932 Japan
936 Chinese (PRC, Singapore)
949 Korean
950 Chinese (Taiwan; Hong Kong SAR, PRC)
1200 Unicode (BMP of ISO 10646)
1250 Windows 3.1 Eastern European
1251 Windows 3.1 Cyrillic
1252 Windows 3.1 Latin 1 (US, Western Europe)
1253 Windows 3.1 Greek
1254 Windows 3.1 Turkish
1255 Hebrew
1256 Arabic
1257 Baltic
1258 Latin 1 (ANSI)
20000 CNS - Taiwan
20001 TCA - Taiwan
20002 Eten - Taiwan
20003 IBM5550 - Taiwan
20004 TeleText - Taiwan
20005 Wang - Taiwan
20127 US ASCII
20261 T.61
20269 ISO-6937
20866 Ukrainian - KOI8-U
21027 Ext Alpha Lowercase
21866 Russian - KOI8
28591 ISO 8859-1 Latin I
28592 ISO 8859-2 Eastern Europe
28593 ISO 8859-3 Turkish
28594 ISO 8859-4 Baltic
28595 ISO 8859-5 Cyrillic
28596 ISO 8859-6 Arabic
28597 ISO 8859-7 Greek
28598 ISO 8859-8 Hebrew
28599 ISO 8859-9 Latin Alphabet No.5
29001 Europa 3
1361 Korean (Johab)

Command-Line Procedures

Use the following procedure to enable a code page that is not the default code page for a locale.

To enable an additional code page on a platform

  1. Create the Nlscpg.txt file in the %_WINCEROOT%\Project\Oak\Files directory.

  2. Insert the code page number.

    You can insert any of the following code pages:

    20000, 20001, 20002, 20003, 20004, 20005, 20127, 20261, 20269, 20866, 21027, 21866, 28591, 28592, 28593, 28594, 28595, 28596, 28597, 28598, 28599, 29001, 708, 860, 861, 863, 864, 865, 869

    If necessary, you can add any of the code pages identified in the %_WINCEROOT%\Common\Oak\Files\Codepage.txt file. When adding code page numbers to the Nlscpg.txt file, separate each number with a space. Each line must end with a carriage return (<CR>).

Locale Code Table

Platform Builder supports all locales that are marked with an ampersand (&). For historical reasons, all locale names marked with an asterisk (*) do not use the standard three-letter naming convention. Use the locale directory to set the COUNTRY environment variable for a localized build of the OS. The following table shows the worldwide locales.

Locale Locale directory (COUNTRY) Locale identifier (LCID) Default code page Language: Country/region (sub-language)
ARA ARA 0x0401 1256 Arabic: Saudi Arabia
ARI ARI 0x0801 1256 Arabic: Iraq
ARE ARE 0x0c01 1256 Arabic: Egypt
ARL ARL 0x1001 1256 Arabic: Libya
ARG ARG 0x1401 1256 Arabic: Algeria
ARM ARM 0x1801 1256 Arabic: Morocco
ART ART 0x1c01 1256 Arabic: Tunisia
ARO ARO 0x2001 1256 Arabic: Oman
ARY ARY 0x2401 1256 Arabic: Yemen
ARS ARS 0x2801 1256 Arabic: Syria
ARJ ARJ 0x2c01 1256 Arabic: Jordan
ARB ARB 0x3001 1256 Arabic: Lebanon
ARK ARK 0x3401 1256 Arabic: Kuwait
ARU ARU 0x3801 1256 Arabic: U.A.E.
ARH ARH 0x3c01 1256 Arabic: Bahrain
ARQ ARQ 0x4001 1256 Arabic: Qatar
BGR BGR 0x0402 1251 Bulgarian: Bulgaria
CAT CAT 0x0403 1252 Catalan: Spain
CHT CHT 0x0404 950 Chinese: Traditional (Taiwan)
CHS CHS 0x0804 936 Chinese: Simplified (PRC)
ZHH ZHH 0x0c04 936 Chinese: Hong Kong S.A.R., PRC
ZHI ZHI 0x1004 936 Chinese: Singapore
ZHM ZHM 0x1404 936 Chinese: Macau SAR
CSY CSY 0x0405 1250 Czech: Czech Republic
DAN DAN 0x0406 1252 Danish: Denmark
&*GERMANY GER 0x0407 1252 German: Germany – Country name and directory non-standard
DES DES 0x0807 1252 German: Switzerland
DEA DEA 0x0c07 1252 German: Austria
DEL DEL 0x1007 1252 German: Luxembourg
DEC DEC 0x1407 1252 German: Liechtenstein
ELL ELL 0x0408 1253 Greek: Greece
&USA USA 0x0409 1252 English: United States
ENG ENG 0x0809 1252 English: United Kingdom
ENA ENA 0x0c09 1252 English: Australia
ENC ENC 0x1009 1252 English: Canada
ENZ ENZ 0x1409 1252 English: New Zealand
ENI ENI 0x1809 1252 English: Ireland
ENS ENS 0x1c09 1252 English: South Africa
ENJ ENJ 0x2009 1252 English: Jamaica
ENB ENB 0x2409 1252 English: Caribbean
ENL ENL 0x2809 1252 English: Belize
ENT ENT 0x2c09 1252 English: Trinidad
ENW ENW 0x3009 1252 English: Zimbabwe
ENP ENP 0x3409 1252 English: Philippines
&*SPAIN ESP 0x040a 1252 Spanish: Spain (Traditional Sort)
ESM ESM 0x080a 1252 Spanish: Mexico
ESN ESN 0x0c0a 1252 Spanish: Spain (International Sort)
ESG ESG 0x100a 1252 Spanish: Guatemala
ESC ESC 0x140a 1252 Spanish: Costa Rica
ESA ESA 0x180a 1252 Spanish: Panama
ESD ESD 0x1c0a 1252 Spanish: Dominican Republic
ESV ESV 0x200a 1252 Spanish: Venezuela
ESO ESO 0x240a 1252 Spanish: Colombia
ESR ESR 0x280a 1252 Spanish: Peru
ESS ESS 0x2c0a 1252 Spanish: Argentina
ESF ESF 0x300a 1252 Spanish: Ecuador
ESL ESL 0x340a 1252 Spanish: Chile
ESY ESY 0x380a 1252 Spanish: Uruguay
ESZ ESZ 0x3c0a 1252 Spanish: Paraguay
ESB ESB 0x400a 1252 Spanish: Bolivia
ESE ESE 0x440a 1252 Spanish: El Salvador
ESH ESH 0x480a 1252 Spanish: Honduras
ESI ESI 0x4c0a 1252 Spanish: Nicaragua
ESU ESU 0x500a 1252 Spanish: Puerto Rico
FIN FIN 0x040b 1252 Finnish: Finland
&*FRANCE FRA 0x040c 1252 French: France
FRB FRB 0x080c 1252 French: Belgium
FRC FRC 0x0c0c 1252 French: Canada
FRS FRS 0x100c 1252 French: Switzerland
FRL FRL 0x140c 1252 French: Luxembourg
FRM FRM 0x180c 1252 French: Monaco
HEB HEB 0x040d 1255 Hebrew: Israel
HUN HUN 0x040e 1250 Hungarian: Hungary
ISL ISL 0x040f 1252 Icelandic: Iceland
&*ITALY ITA 0x0410 1252 Italian: Italy
ITS ITS 0x0810 1252 Italian: Switzerland
&JAPAN JPN 0x0411 932 Japanese: Japan
&*KOREA KOR 0x0412 949 Korean (Extended Wansung): Korea
&NLD NLD 0x0413 1252 Dutch: Netherlands
NLB NLB 0x0813 1252 Dutch: Belgium
NOR NOR 0x0414 1252 Norwegian: Norway (Bokmål)
NON NON 0x0814 1252 Norwegian: Norway (Nynorsk)
PLK PLK 0x0415 1250 Polish: Poland
&*BRAZIL PTB 0x0416 1252 Portuguese: Brazil
PTG PTG 0x0816 1252 Portuguese: Portugal
ROM ROM 0x0418 1250 Romanian: Romania
RUS RUS 0x0419 1251 Russian: Russia
HRV HRV 0x041a 1250 Croatian: Croatia
SRL SRL 0x081a 1250 Serbian: Serbia (Latin)
SRB SRB 0x0c1a 1251 Serbian: Serbia (Cyrillic)
SKY SKY 0x041b 1250 Slovak: Slovakia
SQI SQI 0x041c 1250 Albanian: Albania
&SVE SVE 0x041d 1252 Swedish: Sweden
SVF SVF 0x081d 1252 Swedish: Finland
THA THA 0x041e 874 Thai: Thailand
TRK TRK 0x041f 1254 Turkish: Turkey
URP URP 0x0420 1256 Urdu: Pakistan
IND IND 0x0421 1252 Indonesian: Indonesia
UKR UKR 0x0422 1251 Ukrainian: Ukraine
BEL BEL 0x0423 1251 Belarusian: Belarus
SLV SLV 0x0424 1250 Slovene: Slovenia
ETI ETI 0x0425 1257 Estonian: Estonia
LVI LVI 0x0426 1257 Latvian: Latvia
LTH LTH 0x0427 1257 Lithuanian: Lithuania
LTC LTC 0x0827 1257 Classic Lithuanian: Lithuania
FAR FAR 0x0429 1256 Farsi: Iran
VIT VIT 0x042a 1258 Vietnamese: Vietnam
HYE HYE 0x042b 1252 Armenian: Armenia
AZE AZE 0x042c 1250 Azeri: Azerbaijan (Latin)
AZE AZE 0x082c 1251 Azeri: Azerbaijan (Cyrillic)
MKI MKI 0x042f 1251 Macedonian (FYROM): Former Yugoslav Republic of Macedonia
AFK AFK 0x0436 1252 Afrikaans: South Africa
KAT KAT 0x0437 1252 Georgian: Georgia
FOS FOS 0x0438 1252 Faeroese: Faeroe Islands
HIN HIN 0x0439 1252 Hindi: India
MSL MSL 0x043e 1252 Malay: Malaysia
MSB MSB 0x083e 1252 Malay: Brunei Darussalam
KAZ KAZ 0x043f 1251 Kazak: Kazakhstan
SWK SWK 0x0441 1252 Swahili: Kenya
UZB UZB 0x0443 1250 Uzbek: Uzbekistan (Latin)
UZB UZB 0x0843 1251 Uzbek: Uzbekistan (Cyrillic)
TAT TAT 0x0444 1251 Tatar: Tatarstan
BEN BEN 0x0445 1252 Bengali: India
PAN PAN 0x0446 1252 Punjabi: India
GUJ GUJ 0x0447 1252 Gujarati: India
ORI ORI 0x0448 1252 Oriya: India
TAM TAM 0x0449 1252 Tamil: India
TEL TEL 0x044a 1252 Telugu: India
KAN KAN 0x044b 1252 Kannada: India
MAL MAL 0x044c 1252 Malayalam: India
ASM ASM 0x044d 1252 Assamese: India
MAR MAR 0x044e 1252 Marathi: India
SAN SAN 0x044f 1252 Sanskrit: India
KOK KOK 0x0457 1252 Konkani: India

Week Number Implementation

The following are the three different types of systems for calculating the week numbers that are displayed on the monthly calendar control:

  • ISO system. The first week of the year is the first week that contains Thursday.
  • USA system. The first week of the year is the week containing Jan 1.
  • Other. The first week of the year is the first complete week.

To select a system, enter the following registry setting:

[HKEY_LOCAL_MACHINE\Software\ Microsoft\Calendar\WeekNumbers]
Values (DWORD):
"ISO"=dword:0
"USA"=dword:100
"Other"=dword:101

If you do not specify a registry setting, the ISO system is used. This is default system.

Localizing UI Elements

Microsoft has tested many UI features for the Windows CE OS at resolutions of from 240 x 320 to 1024 x 768. However, due to the characteristics of many UI elements, Microsoft cannot guarantee that all UI elements will function correctly on all display resolutions for all locales. The following table shows UI elements that testing has confirmed to function correctly at the indicated resolutions.

UI element Supported resolution
Control Panel applications that have been sized for the supported resolution. 240 x 320 and above
Control Panel applications that have been sized for the supported resolution. 480 x 240 and above
Open common control 240 x 320 and above or 480 x 240 and above
Save common control 240 x 320 and above or 480 x 240 and above
Color Picker common control 480 x 240 and above
Print Dialog common control 240 x 320 and above or 480 x 240 and above
Applications (several applications now release with the OS) 480 x 240 and above

Microsoft has localized the customizable Touch Screen Calibration UI component, Calibrui. Due to the variety of screen sizes and resolutions, Microsoft cannot guarantee that the UI will be suitable for every application. If the UI is not suitable for your application or target device, modify the current localized strings. You can find the strings for Calibrui in the Calibrui.res file.

Localizing the Currency Symbol

If your platform includes the Regional application in Control Panel, users can determine which currency symbol to use for a specified locale. The Currency tab of the Regional application enables users to change the default currency by using a currency list. Every locale has one specific currency symbol that is displayed on the Currency tab in Control Panel. The Currency tab also displays or adds the dollar sign ($) currency symbol by default. The following table shows the registry entry that Windows CE uses to add additional currency symbols to the Currency tab.

Key Value Data type Radix Data
HKEY_LOCAL_MACHINE\nls\ ExtraCurrency REG_DWORD Hex 20ac

If the registry setting is present and the data value is non-zero, Windows CE displays the currency symbol that is defined by ExtraCurrency in the currency control. A common use of the ExtraCurrency registry value is to support the euro currency symbol. During the transition period to the euro currency symbol, European software may support multiple currency symbols. The ExtraCurrency registry value enables platforms to support monetary transactions until the default currency symbol becomes the euro.

The following code example shows how to define the euro currency symbol.

[HKEY_LOCAL_MACHINE\nls]
   "ExtraCurrency"=dword: 20ac

As with any other registry value, you can use an .str file to localize the currency symbol based on the selected locale.

Localizing for East Asian Locales

The Maxall configuration has been localized for all the locales supported by Platform Builder. Platform Builder includes localized .res files for supported locales. To localize the Minshell and Minwmgr configurations for the Japanese and Korean locales correctly, you must make changes to Cesysgen.bat in Minwmgr and to Project.bib and Project.reg in both Minshell and Minwmgr. This results in a binary OS image that displays the font correctly in the localized files. Make these changes to a copy of Minshell or Minwmgr to verify functionality. The following instructions assume that you have copied the contents of %_WINCEROOT%\Public\Minshell or %_WINCEROOT%\Public\Minwmgr to %_WINCEROOT%\Public\Myproj.

Minwmgr does not support viewing of TrueType fonts—it supports raster fonts only. To support TrueType fonts in Minwmgr, search %_WINCEROOT%\Public\Myproj\Oak\Misc\Cesysgen.bat for the following command line:

set GWE2_COMPONENTS=%GWE2_COMPONENTS% mgrast mgrast2 mgdrwtxt mgpal

Replace it with the following command line:

set GWE2_COMPONENTS=%GWE2_COMPONENTS% mgtt mgdrwtxt mgfe mgalias

Command-Line Procedures

To include font files in the final OS image, you must add the following files to the Project.bib file for your project. You can copy the necessary .bib entries from the Maxall Project.bib file.

To display localized font files correctly in Minshell and Minwmgr

  1. Open your Project.bib file in %_WINCEROOT%\Public\Myproj\Oak\Files and the Maxall Project.bib file in %_WINCEROOT%\Public\Maxall\Oak\Files.

  2. In the Maxall Project.bib file, copy the section that starts with IF COUNTRY=JAPAN, includes IF COUNTRY=CHT, and ends with ENDIF.

    For Minwmgr, you may also want to copy the United States (U.S.) font file entries from the Maxall Project.bib file to your Project.bib file, because the default font files included in Minwmgr are raster fonts.

  3. Paste this section into the FILES section of your Project.bib file, and then save your changes.

  4. Search for "FONT linking and EUDC" in %_WINCEROOT%\Public\Maxall\Oak\Files\Project.reg.

  5. Copy this section to the end of your Project.reg file.

    This action copies the registry settings for the new font files from the Maxall configuration.

    For Minshell, do not include the block starting with IF COUNTRY=USA and ending with ENDIF COUNTRY=USA, because it handles files that are already included in the Minshell .reg file.

After making these changes, you can set COUNTRY to JAPAN, KOREA, or CHS and make an OS image that includes and displays the correct fonts for these locales.

Localizing in Japanese

Three important localization features for the Japanese locale are fonts, input method editors (IMEs), and keyboards. Platform Builder supports the Msgothic.ttc font for the Japanese locale. The following table shows the three IMEs that are included with Platform Builder for Japanese products.

IME Description
Pocket IME Compact; does not contain a UI
IME98 Contains a variety of UI features, based on the Microsoft® Win32® application programming interface (API) IME
TESTIME Basic; use to create your own IME

In addition to three IMEs, Platform Builder supports two keyboards for a Japanese build. The following table describes the platforms and associated keyboard drivers that are included with Platform Builder.

Platform Description
CEPC U.S. keyboard with ALT+" equal to VK_KANJI
Hitachi D9000 hardware development platform (ODO) Full Japanese keyboard

Platform Builder also provides sample codes for Input Method (IM) and IM selector in the Maxall OS configuration, for the Japanese locale. The following table describes the two sample codes.

IM Description
Multibox A sample IM for Japanese handwriting input that works with IME98; it requires Softkb.dll and Hwxjpn.dll; The source code is located in %_WINCEROOT%\Public\Common\Sdk\Samples\Multibox
Sipselect A sample program for selecting any available IM on the fly; interactive with Softkb.dll, and the shell with taskbar. The source code is located in %_WINCEROOT%\Public\Common\Sdk\Samples\Sipselect

Choosing the date format, gg yy/MM/dd, in Windows CE results in an Era symbol and a Gregorian calendar year. To display the Era calendar year, which displays years from the current emperor's accession, you must use the gg ee/MM/dd format.

Command-Line Procedures

To select an IME for a Japanese build

  1. Create the IME variable in your build environment

  2. Set IME to PIME or TESTIME to add the pocket IME or TESTIME to your OS image, respectively.

    If you do not set IME to PIME or TESTIME in your build environment, Platform Builder selects IME98 by default.

To build a Japanese IM and IM selector sample for a Japanese build

  1. Set MULTIBOX=1 for your OS image, if you want to build the Multibox Japanese IM sample.

  2. Set SIPSELECT=1 for your OS image, if you want to build the Sipselect IM selector sample.

  3. Verify that you have set IME to IME98 in your build environment.

    Note Please note that the environment variables MULTIBOX and SIPSELECT require a Maxall OS configuration and the following setting for the COUNTRY environment variable: COUNTRY=JAPAN.

    You can set either MULTIBOX or SIPSELECT in your build environment.

Localizing in Korean

For Korean localization, Platform Builder contains a partially localized version of Windows CE for the Korean locale, the Common project, the Gl_ce.tff Korean font, and a model 106 Korean keyboard driver for the CEPC. The Korean build also contains a Korean IME based on the Windows 95 IME97 IME, as well as a Korean input method (IM).

The following code example shows how the IM calls the ImmEscape function to provide the IME with a handle to the IM window.

ImmEscape((HKL)NULL,(HIMC)NULL, IME_ESC_PRIVATE_FIRST+1,
     (LPVOID)&g_hwndMain);

The IM calls the preceding code example after Windows CE initializes the IM. When the IME mode changes, the IME sends a WM_USER+21 message to the IM. The IM uses the WM_USER+21 message to track the mode of the Input Method Manager (IMM) in order to display the appropriate keyboard layout based on the mode.

The Korean build does not include localized versions of the applications that shipped with the H/PC Pro Edition software, nor does the build include a localized version of Microsoft® Internet Explorer version 4.0.

Command-Line Procedures

Unlike the Msim.dll sample, the Msimk.dll Korean IM sample is not automatically added to the OS image

To add Msimk.dll to your OS image

  1. Modify the .bib file for your project to add Msimk.dll to the image list. For example:

    Msimk.dll   $(_FLATRELEASEDIR)\Msimk.dll    NK  SH
    
  2. Add the appropriate registry settings to the .reg file for your project to have the IM installed in the system.

    For information about registry settings, search for CE_MODULES_MSIM in Common.reg.

  3. Do a clean build of your OS by using sysgen -c

  4. Do a normal build.

  5. Navigate to $_WINCEROOT$\Public\Common\Sdk\Samples\Msimk, and then build the sample project.

  6. If you set WINCEREL=1 before running the build, the .dll file is copied to your Release directory.

  7. After the .dll file is copied to the %_FLATRELEASEDIR% directory, run the Make Binary Image tool (Makeimg.exe) to complete the process.