Application Compatibility in Windows MUI
Before we discuss the application compatibility issues on top of Windows 2000 and Windows XP MUI, we have to stress three basic points:
For further information on the points above please check out the following link: http://technet.microsoft.com/en-us/library/bb457045.aspx.
In general, you can set up any localized version of Windows 2000 or Windows XP to work with any well written localized application. However if proper attention is not given to certain areas in the development of the application, the result will be that the application will only work on certain languages but not all.
On This Page
Running English and localized applications
Assuming the language related settings in Windows are set to match those of the application, you can run almost any localized application on top of any language version o f Windows 2000 or Windows XP. The most interesting scenario though, is running US-English and localized applications side by side on a localized version of Windows 2000 or Windows XP. For this reason, this scenario is covered by the test team and we have found that almost all US-English applications work well on top of any localized or MUI system. In relation to localized applications, our findings lead us to recommend only to use localized applications on their respective localized OS or MUI system. (for MUI, this means to set the user’s UI language to match the application language).
System locale controls the system wide default ANSI and OEM code page. It controls how the non-Unicode APIs (also known as _A APIs) process the character’s code points. For any non-Unicode programs, the program’s working ANSI or OEM code page must be set to match the system’s default ANSI and OEM code page.
To get maximum application compatibility, you can set all the language related settings to match the application’s language. This includes:
If a service or program runs under a special user account that is different from the current user account, please also make sure that the above per user settings are set properly for the account.
In situations where you can use a program properly on a localized OS, but not on an MUI one this is most likely caused by language-related settings not set properly.
Testing localized applications on top of MUI
We strongly recommend ISVs to test their applications on top of MUI, besides testing on top of localized operating systems. We recognize any well-written applications should just work on top of MUI, but we also found that there are applications that depend on some non-standard settings or designs to work. These settings or designs might only exist on top of localized systems. We will discuss more about these issues in the following section. But sometimes, testing applications on top of MUI will allow us easily resolve these issues in application code.
Best practices for application development
The following sections include some best practices that developers should follow during the development time that could make the localized language applications run better on top of a MUI system. While these items are not specially designed for MUI and they are general Windows Logo compliance recommended practices, due to the differences between MUI and localized systems, they will normally expose issues on top of MUI instead of localized ones.
1. Setup and Installation – checking system language
As we mentioned, in general, any language applications should be able to run on top of any language Windows 2000 or Windows XP. Any application should not restrict itself to be run on top of localized systems only. If the application is ANSI-based and requires that the System Locale matches the language to run, it can check that the system locale is set right by calling GetSystemDefaultLangID or GetSystemDefaultLCID.
If the application wants to check if a particular language support is available from the system, it can call EnumLanguageGroupLocales
In most cases, the system locale should be the maximum requirement of the application.
An application can determine whether the system has the MUI add-on using the EnumUILanguages interface. If the enumerated result contains more than one language, then MUI is present. Please also note that an administrator may install the MUI add-on after your application. Inside the program, if it wants to check what the current user’s UI language is, it can call GetUserDefaultUILanguage.
The way to know if an operating system is localized and in which language, is by calling GetSystemDefaultUILanguage on top of Windows 2000 and Windows XP. We strongly advise against using this API and you should never limit your application to only install on top of a particular localized Windows 2000 or Windows XP.
2. Writing MUI Applications
If you want your application to support a Multilingual User Interface like the system’s MUI, please refer to this document for more detail: Writing Multilingual User Interface Applications.
It normally makes sense to have your program’s UI language in sync with the system UI, you can call GetUserDefaultUILanguage to know the current user’s UI language and switch your applications’ based on it.
3. Location Changes and Hard-Coded Paths
The location of many folders and directories changes with each language version of Windows, but they remain in English on MUI machines.
The Windows functions SHGetFolderPath, GetWindowsDirectory, GetSystemDirectory and GetTempPath should be used to find directories used by Windows. Applications that use hard-coded paths to specific locations, may not work on MUI systems.
To find shell folders such as My Documents, use SHGetFolderPath to get the path. You can use it on Windows 95, Windows 98, or any Windows platform, and it will get you to the right place.
The following code example shows how to use SHGetFolderPath; it is a very straightforward API to use.