Share via


Configuration File Localization

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. To add 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 LOCALE 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 Name>\Oak\Files\Intltrns\<Locale> directories. For information about valid locale codes, see Locale Code Table.

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.

  • A maximum of 4-KB strings at one time can be specified.

  • 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 preprocessor 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.

See Also

Week Number Implementation | Localizing a Configuration File | Stripping Quotation Marks from an .str File

 Last updated on Friday, October 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.