by Michael S. Kaplan, published on 2006/01/15 20:01 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2006/01/15/512992.aspx
The other day, someone with the handle of ox asked in the microsoft.public.win32.programmer.international newsgroup:
how to check in my code if a kind of language pack installed. For
example, on english version winxp, while you access a Chinese website,
system will prompt you to install Asian language pack. How did. Thanks.
The answer (which I had written up as a part of an MSDN Magazine article from a few years back) is to use the Component capability methods that were added back in IE 5.0. The important methods to get the job done are:
and the GUIDs for the various language packs and other components can be found in the Detectable Components in Internet Explorer and Installable Components in Internet Explorer topics. The Language Pack and related GUIDS are:
Component
Component ID
Arabic Text Display Support
{76C19B38-F0C8-11CF-87CC-0020AFEECF20}
Chinese (Simplified) Text Display Support
{76C19B34-F0C8-11CF-87CC-0020AFEECF20}
Chinese (traditional) Text Display Support
{76C19B33-F0C8-11CF-87CC-0020AFEECF20}
Hebrew Text Display Support
{76C19B36-F0C8-11CF-87CC-0020AFEECF20}
Japanese Text Display Support
{76C19B30-F0C8-11CF-87CC-0020AFEECF20}
Korean Text Display Support
{76C19B31-F0C8-11CF-87CC-0020AFEECF20}
Pan-European Text Display Support
{76C19B32-F0C8-11CF-87CC-0020AFEECF20}
Thai Text Display Support
{76C19B35-F0C8-11CF-87CC-0020AFEECF20}
Vietnamese Text Display Support
{76C19B37-F0C8-11CF-87CC-0020AFEECF20}
Language Auto-Selection
{76C19B50-F0C8-11CF-87CC-0020AFEECF20}
Uniscribe
{3BF42070-B3B1-11D1-B5C5-0000F8051515}
I even wrote up a nice "how to really annoy readers of your website" page that would try to install of the language components even though it used none of them. I am providing the HTML for this page below (to use it just copy it, paste it into Notepad, and then open it in IE). For obvious reasons I did not include this code behind any pages on this blog. :-)
The technology has largely been passed over at this point, but getting people running earlier versions to get language support was once a very compelling technology.
Enjoy!
This post brought to you by "ෝ" (U+0ddd, a.k.a. SINHALA VOWEL SIGN KOMBUVA HAA DIGA AELA-PILLA)
(A letter that does not have its own language pack for IE)
<HTML xmlns:IE>
<HEAD>
<STYLE>
@media all { IE\:clientCaps {behavior:url(#default#clientCaps)}}
</STYLE><SCRIPT>
function window.onload()
{
var fAra,fChs,fCht,fHeb,fJpn,fKor,fEur,fTha,fVie,fUni;
var fInstallWorked=false;
var sAraID= "{76C19B38-F0C8-11CF-87CC-0020AFEECF20}";
var sChsID= "{76C19B34-F0C8-11CF-87CC-0020AFEECF20}";
var sChtID= "{76C19B33-F0C8-11CF-87CC-0020AFEECF20}";
var sHebID= "{76C19B36-F0C8-11CF-87CC-0020AFEECF20}";
var sJpnID= "{76C19B30-F0C8-11CF-87CC-0020AFEECF20}";
var sKorID= "{76C19B31-F0C8-11CF-87CC-0020AFEECF20}";
var sEurID= "{76C19B32-F0C8-11CF-87CC-0020AFEECF20}";
var sThaID= "{76C19B35-F0C8-11CF-87CC-0020AFEECF20}";
var sVieID= "{76C19B37-F0C8-11CF-87CC-0020AFEECF20}";
var sUniID= "{3BF42070-B3B1-11D1-B5C5-0000F8051515}";// find out if a language is not installed
fAra= (!(oClientCaps.isComponentInstalled(sAraID,"componentid")))
fChs= (!(oClientCaps.isComponentInstalled(sChsID,"componentid")))
fCht= (!(oClientCaps.isComponentInstalled(sChtID,"componentid")))
fHeb= (!(oClientCaps.isComponentInstalled(sHebID,"componentid")))
fJpn= (!(oClientCaps.isComponentInstalled(sJpnID,"componentid")))
fKor= (!(oClientCaps.isComponentInstalled(sKorID,"componentid")))
fEur= (!(oClientCaps.isComponentInstalled(sEurID,"componentid")))
fTha= (!(oClientCaps.isComponentInstalled(sThaID,"componentid")))
fVie= (!(oClientCaps.isComponentInstalled(sVieID,"componentid")))
fUni= (!(oClientCaps.isComponentInstalled(sUniID,"componentid")))// if support for any language is unavailable, mark it to be installed
if (fAra) oClientCaps.addComponentRequest(sAraID, "componentid");
if (fChs) oClientCaps.addComponentRequest(sChsID, "componentid");
if (fCht) oClientCaps.addComponentRequest(sChtID, "componentid");
if (fHeb) oClientCaps.addComponentRequest(sHebID, "componentid");
if (fJpn) oClientCaps.addComponentRequest(sJpnID, "componentid");
if (fKor) oClientCaps.addComponentRequest(sKorID, "componentid");
if (fEur) oClientCaps.addComponentRequest(sEurID, "componentid");
if (fTha) oClientCaps.addComponentRequest(sThaID, "componentid");
if (fVie) oClientCaps.addComponentRequest(sVieID, "componentid");
if (fUni) oClientCaps.addComponentRequest(sUniID, "componentid");
// Do requests, if any were actually made
if (fAra|fChs|fCht|fHeb|fJpn|fKor|fEur|fTha|fVie|fUni)
{
document.write('Must install some languages!');
fInstallWorked=oClientCaps.doComponentRequest();
document.write('The return from the doComponentRequest call was: ' + fInstallWorked);
}
else
{
document.write('All languages are installed!');
}
}
</SCRIPT>
<Title>The ANNOYING 'install every language on IE' page!</Title>
</HEAD><BODY BGCOLOR="#FFFFFF">
:
<IE:clientCaps ID="oClientCaps" />
:
</BODY>
# Maurits [MSFT] on 16 Jan 2006 12:55 PM:
# Michael S. Kaplan on 16 Jan 2006 2:17 PM:
# Maurits [MSFT] on 16 Jan 2006 4:31 PM:
# Maurits [MSFT] on 16 Jan 2006 4:37 PM:
# Michael S. Kaplan on 16 Jan 2006 5:07 PM:
# Maurits [MSFT] on 16 Jan 2006 5:15 PM:
# Michael S. Kaplan on 16 Jan 2006 5:17 PM:
# Maurits [MSFT] on 16 Jan 2006 5:32 PM:
# Michael S. Kaplan on 16 Jan 2006 5:38 PM:
# Jerry Pisk on 17 Jan 2006 3:31 PM:
# Michael S. Kaplan on 17 Jan 2006 4:14 PM:
# Richard on 23 Jan 2006 7:23 AM:
Wes on 15 Mar 2010 1:53 AM:
thanks a million. the link to how to restore the language pack options helped me out. I have a native Korean customer that has learned to do the basic (click a box to see if it fixes it) surfing thru trial and error with an English xp pro install. he just needed to get the language packs and MUI's installed to fix a lot of his short-comings in the English version.
and now I have some new code to put on my home sever box to test these out :)
thanks again
referenced by
2006/07/25 Is East Asian support installed?