HOWTO: Determine Default Language ID of Windows 95 or WinNT
ID: Q181604
|
The information in this article applies to:
-
Microsoft Win32 Software Development Kit (SDK)
SUMMARY
Some applications need to get the operating system's language ID.
GetSystemDefaultLangID doesn't work, because the user can change it in the
Control Panel.
For example, on English Windows 95, the user opens Control Panel, clicks
Regional Settings, and changes the setting from English US to French France
in the Regional Settings Properties dialog box. As a result,
GetSystemDefaultLangID changes to French too. On Windows NT, the user
clicks Control Panel, clicks Regional Settings, and opens the Regional
Settings Properties dialog box. In the Regional Settings Properties dialog
box, the user selects a different Locale in a different language, selects
the "Set as system default locale" check box, and then restarts the
computer. As a result GetSystemDefaultLangID changes too the new language
too.
This article explains more reliable methods you can use to get the
installed operating system's language ID.
MORE INFORMATION
The following methods are available to get the installed operating system's
language ID:
- Under Windows 95, retrieve the installed operating system's Locale ID
from HKEY_CURRENT_USER\Control Panel\desktop\ResourceLocale
(HKEY_USERS\.Default\Control Panel\desktop\ResourceLocale. Use
LANGIDFROMLCID to retrieve the Language ID value from the Locale value.
NOTE: This key does not exist under Windows NT, therefore, this method
does not work under Windows NT.
- Under Windows NT 4.0 and Windows 95 (only Windows 95 installations that
have turned on user profile), retrieve the installed operating system's
Locale ID from HKEY_USERS\.DEFAULT\Control Panel\International. Then get
the Language ID from the LCID.
NOTE: This method only works under Windows 95 after user profile has
been turned on. Otherwise, it does not work under Windows 95.
- Under both Windows NT and Windows 95, you can get the language
information in the FileVersionInfo of User.exe by calling
GetFileVersionInfo, and then VerQueryValue (on
\\VarFileInfo\\Translation") on the VersionInfo block of the operating
system's User.exe.
NOTE: This method is the most reliable. It works well under both Windows
NT and Windows 95. This method also works for Windows 3.1.
Additional query words:
Keywords : kbIntlDev
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbinfo
|