Microsoft KB Archive/300680

= Loading multilingual resource on Windows 2000 =

Article ID: 300680

Article Last Modified on 3/2/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows 2000 Datacenter Server

-



This article was previously published under Q300680



SUMMARY
When developing globalized software on previous versions of an operating system, developers used to depend on the operating system to load the preferred resource copy from the multi-lingual resource file. Due to a design change in Microsoft Windows 2000, the preceding approach may behave differently on a Windows 2000 computer. There is a new parameter, User Interface Language (UILanguage), which may also affect the resource loading.



MORE INFORMATION
On a Microsoft Windows NT 4.0-based computer and Microsoft Windows 95, or a Microsoft Windows 98-based computer, without changing the thread locale, the resource copy that matches the user locale in regional settings is likely to be loaded from the multilingual resource file. Resource loading works differently on Windows 2000, where the one that matches the user default UILanguage is loaded. On a non-Multilingual user interface (MUI) version of Windows 2000, the user default UILanguage is the language of the installed operating system. The following scenario describes the difference. Assume the multilingual resource file includes both English (United States) and French (France) resources, on an English Windows NT 4.0 computer with regional settings set to French (France), and the French resource is loaded. On a Windows 2000-based computer, the English resource is loaded when the settings are set to French (France), because the English resource matches the user default UILanguage. Although changing the thread locale can change the resource loading, it will not be the same behavior as that of Windows NT 4.0.

The standard solution is to build a resource-only DLL for each different language, and load the preferred DLL when necessary.

