Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

For an application to support a multiple–language UI, you must create a per–language DLL that contains only localizable resources. Place this DLL in the same directory as the executable. Do not create a DLL for the system–default language. Localizable resources for the system–default language remain in the executable.

For example, if the DLL for the system–default language is sample.dll, then the localized DLL should be named sample.dll.< LCID>.mui, according to the naming conventions for MUI DLLs. Once the files are named this way, you will only need to give the instance of sample.dll and the resource ID for the operating system to find it. The OS will first try to load the resource from the MUI DLL. If it fails, either because the MUI DLL does not exist or the resource does not exist in the MUI DLL, the OS will try the base DLL.

There are no other changes required of the application, and no changes are needed in the core application code.

Your application can call EnumUILanguagesto determine which languages are supported, and therefore decide which resource DLLs to install. To determine the end-user default and system default UI languages, use GetUserDefaultUILanguageand GetSystemDefaultUILanguage, respectively.

To load and get the DLL handle for a language, call LoadLibrary. Thereafter, this handle is used in all calls to load resources. You should cache the handle returned by LoadLibraryto reduce the need for multiple redudant calls. This is of particular performance value when working with the base MUI DLL modules, as these libraries will need to be loaded across multiple resources.

If you need finer control over loading resources from the DLL, use LoadLibraryExinstead of LoadLibrary.

In the case of failure to load the appropriate language DLL, for example when the target language is not supported in the application, you must assume that the default preferred language DLL is present on the system.

In addition, you must decide on a default language for your application to use during application initialization in case the requested language is not available.

See Also