Multilingual User Interface Explained

Multilingual User Interface (MUI) enables the localization of the user interface of an application.

MUI is provided by Microsoft as an integrated feature of its operating system Windows 11 down to Windows 2000 with some limitations in older versions.

MUI is used for localizing flagship Microsoft products Microsoft Windows and Microsoft Office and as an open technology can be used in any application that runs in a version of Windows that supports MUI.

The core feature of MUI is the user-defined, system settings for preferred language that can be used/shared by all applications on a computer. The next most core feature is system functions (i.e. LoadString) that use this preference to load user interface assets at runtime from resources in the user's preferred language. To be MUI-enabled, an application need only store user interface assets as language-specific resources and use LoadStrIng to load them at runtime.

MUI also supports storing user interface assets as separate, single-language files which provides for development and deployment flexibility. This feature is optional. The resources can be stored in the application binary.

MUI also provides system functions that allow for custom and extended localization behavior.

Overview

The MUI technology[1] is integrated into the Windows OS and can be leveraged in an application by storing localizable assets as resources in a prescribed way and using MUI-enabled win32 functions to read the resources.

A relatively simple implementation of MUI in an application stores the strings of each language in a string-table resource of the binary file and uses the win32 function LoadString to load strings at runtime. No other MUI related configuration or code is required. The following optional capabilities of MUI can be implemented if desired:

The design of MUI attempts to provide a common way to store application localization information that alleviates limitations of more traditional and monolithic designs for localization such as including all languages in the application logic files (i.e. resources). With MUI, the following deployment scenarios are possible:

Terminology

The following MUI related terms are either used in or derived from the Microsoft documentation.

Language-neutral (LN): Describes something that conveys a meaning regardless of the languages of the viewer, such as an image without text or other localizable aspects

LN resource: a resource that is shared by and installed for all language versions of the application

LN file: Windows binary containing the application logic and language-neutral resources

Language-specific (LS): Describes something that has significantly different meaning based on the languages of the viewer. The most common LS items are interface strings but can be other items such as an image with text in it

LS resource file: A set of resources localized for one language; a.k.a. MUI file

Language Preferences

A language selection is stored by the system for the system (shared by all users and maybe used as default for a new user) and for each user. These selections can be modified by the user via the system Control Panel but cannot be modified by an application.

These preferences control the language that the OS uses for UI elements. Applications can also use these preferences, and via MUI-enabled system functions (such as LoadString) the use is automatic and transparent (requires no MUI-specific code to use). But use of these preferences is optional and customizable. An application can be designed to ignore the language preferences. Or it may use them in ways other than that provided by MUI-enabled system functions.

An application can use MUI functions[2] to read language preferences -- that default to the user selection [assumed] and are a list of languages in preference order. These preferences are provided at the system, user, process and thread levels [assumed that changing at a higher level modifies the preferences for lower levels].

An application can modify these language preference lists (via SetThreadPreferredUILanguages and other functions) in order to influence the behavior of MUI. For example: std::string languageIdSpec = "en-US"; languageIdSpec.push_back('\0'); // must be double-null terminated ULONG langCount = 1; if (!::SetThreadPreferredUILanguages(MUI_LANGUAGE_NAME, languageIdSpec.c_str, &langCount))     throw std::runtime_error("Unable to set thread preferred UI language.");

Resource Storage

MUI provides support for localized resources stored in Windows binary (a.k.a. Win32 PE) files (DLL, EXE, SYS) -- usually DLL files.

The resources for a language can either be stored in the application binary or in a MUI (a.k.a. LS) file -- one per language. For MUI to find resources, a MUI file must be in the same directory as its associated LN file and be named the same as the LN file plus ".LCID.mui". For example, for LN file my-lib.dll, the MUI file for en-US would be named my-lib.dll.0409.mui.

String resources are coded as string table like so: LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL STRINGTABLE BEGIN 1 L"message text" END

Resource Retrieval

Several win32 functions that read application resources are MUI-enabled, including LoadString, FormatMessage, and LoadImage.[3]

Each function attempts to read a resource for a language as selected by global language preferences, from application resources or associated MUI files (co-located with LN file and following naming convention). Each uses the global language preferences to choose a language that is available. If loading the resource for the first preferred language fails either because the MUI file does not exist or the resource does not exist in the MUI file, the function will try the next preferred language and so on until all preferences have been tried. If load fails for all preferred languages, then tries the LN file.

The most commonly used function is LoadString which loads strings from a string-table resource. Example using LoadString: wchar_t* resourceCharArray; int resourceLength = ::LoadStringW(_moduleHandle, resourceId, (LPWSTR)&resourceCharArray, 0); if (!resourceLength)     throw std::runtime_error("Unable to find resource."); std::wstring text; text.append(resourceCharArray, resourceLength);This retrieves the address of the resource text character buffer which is not guaranteed to be null terminated. Then, this copies the characters to a std::string and its c_str method is guaranteed to be null terminated. Therefore, there is no need to append a null. Another option is to have LoadString copy the string to a passed buffer, but that requires using a fixed-length buffer which has downsides like usually allocating more than needed or truncation if too short.

Oddly, MS documentation for LoadString does not mention its interaction with MUI -- use of language preference.

FormatMessage is also MUI-enabled. Its function reference page describes its interaction with the user's language preference when parameter dwLanguageId is passed as 0. But FormatMessage reads from a message table, not a string table and as Raymond Chen says, "nobody actually uses message tables".[4]

Non-Resource Storage and Retrieval

MS documentation recommends storing UI assets as resources since MUI fully supports retrieving from this storage, but it notes that MUI supports any other file format, such as XML, JSON or flat text file.[5] This implies that using the resource retrieval aspect of MUI is not required for an application to be MUI-enabled. An application can use its own, custom UI asset retrieval logic.

To be MUI-enabled, the application must use the system language preferences. The custom UI asset retrieval logic might optionally use the MUI function GetFileMUIPath to leverage the MUI file location and naming conventions.

Other Aspects

The MS MUI documentation describes the following concepts, but it is unclear how they relate to MUI and what value they offer:

Implementing

Basic tasks to support/implement MUI:

Upon completing the basic tasks, an application is MUI-enabled. But there are other features of MUI that an application can optionally take advantage of.

The basic tasks imply storing all languages in the resources of the application binary -- which means it is not language neutral. This structure provides all runtime localization benefits of MUI and simple, single-file deployment but does not allow for deployment flexibility that MUI provides. In order to take advantage of the deployment flexibility:

To store localized assets in formats other than resource, the application must implement a mechanism for reading assets at runtime based on the language preference system settings (see GetThreadUILanguage). In other words, the application loads UI assets based on the system language preference settings without using LoadString. The application might leverage the MUI file-per-language location and naming convention by using GetFileMUIPath.

Advantages over Localized Version

The MUI technology was developed in response and as an improvement to localized versions -- an older technology for globalizing and deploying software packages. This section describes the differences and advantages of MUI over localized versions.

Windows localized via a MUI pack achieves the same goal as a localized version, but there are key differences. While both display menus and dialogs in the targeted language, only a localized version uses translated file and folder names. [what does this mean? some special folders are localizable (Documents, Downloads, ...) but a user created file/folder is not localizable (by the OS). Doesn't a language pack localize the special folder names? What else could it do?]

A localized version of Windows translates the base operating system, as well as all included programs [what programs?], including file and folder names [so it does localize file/folder names. this contradicts above], objects names [what's an object?], strings in registry [really? what strings?], and any other internal strings used by Windows into a particular language. Localized versions of Windows support upgrading from a previous localized version and user interface resources are completely localized, which is not the case for MUI versions of a product. [what is not the case for MUI?]

A MUI version does not contain translated administrative functions such as registry entries [registry entries are functions?] and items in Microsoft Management Console.

One advantage of a MUI version is that each user of a computer can use a different language.[8] For a localized version of the OS, this is not possible. It may be possible for localized applications but requires installing multiple versions; one for each language, and this may lead to application storage space and side-by-side installation issues. With MUI, the single version supports multiple languages, and the OS and applications use the user's preferred language. Further, the same OS can host an application that uses any of the application's supported languages which may be different than the OS selected language and even a language that's not supported by the OS.

History

MUI was introduced with Windows 2000 and is supported in each subsequent Windows release.

Windows 2000 and Windows XP

MUI products for these versions were available only through volume agreements from Microsoft. They were not available through retail channels. However, some OEMs distributed the product.

Languages in Windows XP

Up to Windows XP, MUI packs for a product are applied on top of an English version to provide a localized user experience. There are a total of 5 sets of MUI packs.

Set 1
Set 2
Set 3
Set 4
Set 5

Windows Vista

Windows Vista enhanced MUI technology to separate the English resources from the application logic binary files. The application logic files are now language-neutral a.k.a. language-independent. In other words, the application logic files are no longer English-centric. This separation allows for changing languages completely without changing the core binaries of Windows, and to have multiple languages installed using the same application logic binaries. Languages are applied as language packs containing the resources required to localize part of or the entire user interface in Windows Vista.

MUI packs are available to Windows Vista Enterprise users and as an Ultimate Extras to Windows Vista Ultimate users.

Beginning with Windows Vista, the set of associated MUI APIs are also made available to developers for application development. [This allows anyone to use the MUI technology?]

At launch, the following 16 language packs were released:

On October 23, 2007, the remaining 19 language packs were released:

Windows 7

MUI is available to Windows 7 Enterprise and Ultimate edition users, as well as Windows Phone 7.

Beginning with Windows 7, Microsoft started referring to a "MUI pack" as a "Language Pack"; not to be confused with a Language Interface Pack (LIP).[9]

List of languages in Windows 7 (PC)

At launch, the following 15 language packs were released[10] (Chinese (Hong Kong) is not available on mobile):

On October 31, 2009, the remaining 22 language packs were released (Estonian, Croatian, Latvian, Lithuanian, Romanian, Slovak, Slovenian, Serbian, Bulgarian, Hebrew, Arabic, and Thai are not available on mobile):

List of languages in Windows Phone 7

At launch, only six languages were supported.

With the launch of Windows Phone 7.5 on September 27, 2011, twenty more languages are added (Turkish and Ukrainian are not supported as display languages until Windows Phone 8).[11] The first LIPs for Windows Phone 7 were Indonesian and Malay with the Tango update.[12]

Windows 8/8.1/RT

Beginning with Windows 8/RT, most editions of Windows are able to download and install all Language Packs,[13] with a few exceptions:

Windows 10

Beginning with Windows 10 version 1803, Microsoft started using the term "Local Experience Pack" (LXP) in some places [store?] instead of the older term "Language Pack", but they work the same way.[18] In addition to installing via Windows Settings, these 110 LXPs are also available through the Microsoft Store (app and web); the latter enabling remote installation for consumer editions of Windows.[19] As with all applications from the Microsoft Store, only the LXPs that are compatible with that Windows device are shown in the Microsoft Store app.

An LXP is updated through the Microsoft Store; outside of the normal Windows update cycle.[20]

Supported languages

Supported languages by OS version is as follows:

PC

MUI Language Packs by Windows version!Language!English name!2000!XP!Vista!7.0!7.1!8.0!8.1!10!11
العربيةArabic
БългарскиBulgarian
CatalàCatalan (Spain)
ČeštinaCzech
DanskDanish
DeutschGerman
ΕλληνικάGreek
English (United Kingdom)English (United Kingdom)
English (United States)English (United States)
Español (España)Spanish (Spain)
Español (México)Spanish (Mexico)
EestiEstonian
EuskaraBasque
SuomiFinnish
Français (Canada)French (Canada)
Français (France)French (France)
GalegoGalician
עבריתHebrew
HrvatskiCroatian
MagyarHungarian
IndonesiaIndonesian
ItalianoItalian
日本語Japanese
한국어Korean
LietuviųLithuanian
LatviešuLatvian
Norsk bokmålNorwegian Bokmål
NederlandsDutch
PolskiPolish
Português (Brasil)Portuguese (Brazil)
Português (Portugal)Portuguese (Portugal)
RomânăRomanian
РусскийRussian
SlovenčinaSlovak
SlovenščinaSlovenian
SrpskiSerbian (Latin)
SvenskaSwedish
ไทยThai
TürkçeTurkish
УкраїнськаUkrainian
Tiếng ViệtVietnamese
中文 (简体)Chinese (Simplified)
中文 (香港特別行政區)Chinese (Hong Kong)
中文 (繁體)Chinese (Traditional)
Language Interface Packs by Windows version!Language!English name!Base language required!XP!Vista!7.0!7.1!8.0!8.1!10!11
AfrikaansAfrikaansEnglish
አማርኛAmharicEnglish
অসমীয়াAssameseEnglish
AzərbaycanAzerbaijaniEnglish
БеларускаяBelarusianRussian
বাংলা (বাংলাদেশ)Bangla (Bangladesh)English
বাংলা (ভারত)Bangla (India)English
БосанскиBosnian (Cyrillic)Russian
BosanskiBosnian (Latin)English
CatalàCatalan (Spain)English
ValenciàCatalan (Spain, Valencian)Spanish
ᏣᎳᎩCherokeeEnglish
CymraegWelshEnglish
EuskaraBasqueSpanish
فارسىPersian (Iran)English
FilipinoFilipinoEnglish
GaeilgeIrishEnglish
GàidhligScottish GaelicEnglish
GalegoGalicianSpanish
ગુજરાતીGujaratiEnglish
HausaHausaEnglish
हिन्दीHindiEnglish
ՀայերենArmenianEnglish
IndonesiaIndonesianEnglish
IgboIgboEnglish
ÍslenskaIcelandicEnglish
ᐃᓄᒃᑎᑐᑦInuktitutEnglish
ქართულიGeorgianEnglish
Қазақ тіліKazakhEnglish
ខ្មែរKhmerEnglish
ಕನ್ನಡKannadaEnglish
कोंकणीKonkaniEnglish
کوردیی ناوەڕاستCentral KurdishEnglish
КыргызчаKyrgyzRussian
LëtzebuergeschLuxembourgishFrench
ລາວLao???
Te reo MāoriMaoriEnglish
МакедонскиMacedonianEnglish
മലയാളംMalayalamEnglish
МонголMongolianEnglish
मराठीMarathiEnglish
Melayu (Brunei)Malay (Brunei)English
Melayu (Malaysia)Malay (Malaysia)English
MaltiMalteseEnglish
नेपालीNepaliEnglish
Norsk nynorskNorwegian NynorskNorwegian Bokmål
Sesotho sa LeboaSouthern SothoEnglish
ଓଡ଼ିଆOdiaEnglish
پنجابیPunjabi (Arabic, Pakistan)English
ਪੰਜਾਬੀPunjabi (Gurmukhi, India)English
درىPersian (Afghanistan)English
K'iche'K'iche'Spanish
RunasimiQuechuaSpanish
KinyarwandaKinyarwandaEnglish
سنڌيSindhiEnglish
සිංහලSinhalaEnglish
ShqipAlbanianEnglish
Српски (Босна и Херцеговина)Serbian (Bosnia & Herzegovina)English
Српски (Србија)Serbian (Serbia)Serbian (Latin)
KiswahiliSwahiliEnglish
தமிழ்TamilEnglish
తెలుగుTeluguEnglish
ТоҷикӣTajikRussian
ትግርTigrinyaEnglish
Türkmen diliTurkmenRussian
SetswanaTswanaEnglish
ТатарTatarRussian
ئۇيغۇرچەUyghurChinese (Simplified)
اُردوUrduEnglish
O‘zbekUzbekEnglish
Tiếng ViệtVietnameseEnglish
WolofWolofFrench
IsiXhosaXhosaEnglish
Èdè YorùbáYorubaEnglish
IsiZuluZuluEnglish

Mobile

The multilingual user interface for Windows Phones did not appear until version 7.0.

Language packs for the new Windows Phone platform!Language!English name!7.0!7.5!7.7!7.8!8.0!8.0.2!8.1!8.1.2!10
AfrikaansAfrikaans
አማርኛAmharic
العربيةArabic
AzərbaycanAzerbaijani
БеларускаяBelarusian
БългарскиBulgarian
বাংলাBangla
CatalàCatalan
ČeštinaCzech
DanskDanish
DeutschGerman
ΕλληνικάGreek
English (United Kingdom)English (United Kingdom)
English (United States)English (United States)
Español (España)Spanish (Spain)
Español (México)Spanish (Mexico)
EestiEstonian
EuskaraBasque
فارسىPersian
SuomiFinnish
FilipinoFilipino
Français (Canada)French (Canada)
Français (France)French (France)
GalegoGalician
HausaHausa
עבריתHebrew
हिन्दीHindi
HrvatskiCroatian
MagyarHungarian
IndonesiaIndonesian
ÍslenskaIcelandic
ItalianoItalian
日本語Japanese
Қазақ тіліKazakh
ខ្មែរKhmer
ಕನ್ನಡKannada
한국어Korean
ລາວLao
LietuviųLithuanian
LatviešuLatvian
МакедонскиMacedonian
മലയാളംMalayalam
MelayuMalay
Norsk bokmålNorwegian Bokmål
NederlandsDutch
PolskiPolish
Português (Brasil)Portuguese (Brazil)
Português (Portugal)Portuguese (Portugal)
RomânăRomanian
РусскийRussian
SlovenčinaSlovak
SlovenščinaSlovenian
ShqipAlbanian
SrpskiSerbian
SvenskaSwedish
KiswahiliSwahili
தமிழ்Tamil
తెలుగుTelugu
ไทยThai
TürkçeTurkish
УкраїнськаUkrainian
O‘zbekUzbek
Tiếng ViệtVietnamese
中文 (简体)Chinese (Simplified)
中文 (香港特別行政區)Chinese (Hong Kong)
中文 (繁體)Chinese (Traditional)

Patent

The MUI technology is covered by an international patent titled "Multilingual User Interface for an Operating System".[21] The inventors are Bjorn C. Rettig, Edward S. Miller, Gregory Wilson, and Shan Xu.

See also

both a UNIX system for localization and a function similar to LoadString

Notes and References

  1. Web site: Karl-Bridge-Microsoft . Multilingual User Interface - Win32 apps . 2022-07-10 . docs.microsoft.com . en-us.
  2. Web site: Karl-Bridge-Microsoft . Multilingual User Interface Functions - Win32 apps . 2022-07-10 . docs.microsoft.com . en-us.
  3. Web site: Karl-Bridge-Microsoft . Loading Language Resources - Win32 apps . 2022-07-10 . docs.microsoft.com . en-us.
  4. Web site: Chen . Raymond . 2008-02-29 . Why can't I get FormatMessage to load my resource string? . 2022-07-08 . The Old New Thing . en-US.
  5. Web site: Karl-Bridge-Microsoft . Supporting System Language Settings - Win32 apps . 2022-07-09 . docs.microsoft.com . en-us.
  6. Web site: Karl-Bridge-Microsoft . Preparing a Resource Configuration File - Win32 apps . 2022-07-10 . docs.microsoft.com . en-us.
  7. Web site: Karl-Bridge-Microsoft . Using Registry String Redirection - Win32 apps . 2022-07-10 . docs.microsoft.com . en-us.
  8. Web site: About Multilingual User Interface . 22 June 2022 . Microsoft.
  9. Web site: How To Install Language Packs In Windows 7. live. https://web.archive.org/web/20100801043244/https://www.thewindowsclub.com/how-to-install-language-packs-in-windows-7. 1 August 2010. 29 April 2016. The Windows Club.
  10. Web site: Team . My Digital Life Editorial . 2009-07-12 . Windows 7 RTM GA Launch and MSDN/TechNet Release Schedule Roadmap « My Digital Life . 2023-07-26 . My Digital Life . en-US.
  11. Web site: Blog . Windows Experience . McConnell . John . 2011-07-06 . Windows Phone around the world: Language support in Mango . 2023-11-22 . Windows Experience Blog . en-US.
  12. Web site: Blog . Windows Experience . Myerson . Terry . 2012-02-27 . Windows Phone at Mobile World Congress 2012 . 2023-11-22 . Windows Experience Blog . en-US.
  13. Web site: Language packs are available for Windows 8 and Windows RT. 29 April 2016. Microsoft.
  14. Web site: Check whether your version of Windows supports multiple languages. 2022-01-10. support.microsoft.com.
  15. Web site: Blog. Windows Experience. 2011-07-06. Windows Phone around the world: Language support in Mango. 2022-01-10. Windows Experience Blog. en-US.
  16. Web site: Get Samsung Notes. 2022-01-10. Microsoft Store. en-us.
  17. Web site: Language packs for Windows. 2022-01-11. support.microsoft.com.
  18. Web site: 2018-11-14. Local Experience Packs: What are they and when should you use them?. 2022-01-10. TECHCOMMUNITY.MICROSOFT.COM. en.
  19. Web site: Local Experience Packs. 2022-01-10. Microsoft Store. en-us.
  20. Web site: Local Experience Packs. 2022-01-11. support.microsoft.com.
  21. US. 6252589. Multilingual user interface for an operating system. patent. 2003-05-14.