Microsoft KB Archive/169483

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 21:50, 16 July 2020 by X010 (talk | contribs) (1 revision imported: importing part 2)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

INFO: Resource Language Loading Order

Q169483



The information in this article applies to:


  • Microsoft Win32 Software Development Kit (SDK)
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Professional





SUMMARY

When an application containing resources for multiple languages is running on Windows 95 or Windows NT, the operating system attempts to load the resource with the most suitable language marking. It determines the most suitable language marking according to the thread's Locale ID (in the case of Windows NT) or the system's Locale ID (in the case of Windows 95). The operating system does this without intervention from the application program.

The operating system searches for the resource (except string resource) to be loaded in the following order:

Windows NT

The search pattern for the resource language marking is:


  1. Neutral
  2. Primary Lang/ Sub lang
  3. English (US)
  4. Neutral (default)
  5. Any other languages
  6. Neutral (sys default)

Windows 95

  1. Neutral
  2. Primary Lang/ Sub Lang
  3. Primary Lang/ Sublang_neutral
  4. English (US)
  5. Neutral (default)
  6. Whatever else it can find

For example, if the application contains a dialog box resource in Swiss German, French, US English, the Swiss German dialog box would be loaded when running on Swiss German NT, when DialogBox() is called to bring up this dialog box. If the same binary is running on a Spanish version of Windows NT, then the US English version of the same dialog box is loaded. These examples will occur without any change to the code.

Programmers can also control the language version of the resource they are loaded by calling FindResourceEx(), and specifying the language directly.

The string resource is loaded in a slightly different order:

Windows NT

  1. Neutral
  2. Prim Lang/ Sub Lang
  3. English (US)
  4. Neutral (default)
  5. Whatever else it can find

Windows 95

  1. Neutral
  2. Neutral (default)
  3. Neutral (sys default)
  4. Prim Lang/ Sub Lang
  5. English (US)
  6. English
  7. Whatever else it can find

Additional query words:

Keywords : kbprogramming kbIntl kbNLS kbOSWin2000 kbSDKWin32
Issue type : kbinfo
Technology : kbwin2000AdvServ kbwin2000AdvServSearch kbwin2000Serv kbwin2000ServSearch kbwin2000Search kbwin2000ProSearch kbwin2000Pro kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWinAdvServSearch kbWin32sSearch


Last Reviewed: November 22, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.