Microsoft Knowledge Base |
|
Identifying the Versions of International Windows |
|
|
Last reviewed: October 17, 1996
Article ID: Q130062 |
|
The information in this article applies to:
SUMMARYThis article suggests three ways to check for the language used in an international version of a Windows-based application.
MORE INFORMATION
Option One: Least Coding and Least AccurateCheck the "sCountry" entry under the [intl] section of the WIN.INI file by using the GetProfileString API. It is likely that this will match the Windows language version. For example, German Windows will probably have "Deutchland" and English Windows will probably have "United States" or "United Kingdom." However, because the user can change this setting by using the Control Panel, it is not always accurate.
Option Two: Most Coding and Most AccurateCheck the "deflang" entry under the [data] section of the SETUP.INF file. This is a three-letter language code that SETUP.EXE uses. The setting will be one of these:
English=ENU or ENG Spanish=ESP German=DEU French=FRA or FRC (French Canadian) Italian=ITAThe problem with this method is getting at the "deflang" entry in the SETUP.INF file. The applications should parse SETUP.INF. It's not that difficult, but it does involve extra coding.
Option Three: Let the User ChooseSuggest to the user what the application found, and let the user make final decision. Here's the algorithm:
if Windows Version < 3.1
Look at Win.ini, Setup.inf files
Suggest a good guess and let the user choose;
Register a profile string for your app;
else
Use version stamping;
For Windows version 3.1, the way to identify the character set is to use
the version stamping API. The translation value from the GetFileVersionInfo
when performed on GDI or SHELL.DLL is the only way in version 3.1 to find
out the character set of the system. Please refer to the SDK documentation
for more details on this API. Look for both GetFileVersionInfo and
VERSIONINFO.
The VERSIONINFO statement creates a version-information resource. The resource contains information about the file such as its version number, its intended operating system, and its original filename. One of the parameters is langID, which specifies the language identifiers.
|
|
Additional reference words: 1.20 3.10
©1997 Microsoft Corporation. All rights reserved. Legal Notices. |