Setting Language Dependency Using OSDSetting Language Dependency Using OSD*
*



Contents  *



Index  *Topic Contents
*Previous Topic: How to Automatically Update an ActiveX Control
*Next Topic: Open Software Description Reference

Setting Language Dependency Using OSD

The model is based on a data file (an OSD file) housed in a signed cabinet (CAB) file (for security) that specifies which languages and platforms the application supports and at which location.

This OSD is alone in a main CAB placed in the GUID directory for the control/application on the object store or at some code base URL location. The OSD tells Internet Component Download which languages are available under the DEPENDENCY element by specifying sections for those languages.

If the specific language CAB is empty or not found and English is supported, code download proceeds to download the English version of the control/application. The next time this object is referenced, Internet Component Download checks the LanguageCheckPeriod default value (expressed in days and implemented by the control/application itself in the OSD). Internet Component Download compares the downloaded date plus elapsed days with the current date to decide whether to download the main CAB again to check for language updates. If the language has become available, Internet Component Download shows a certificate to the user and downloads the localized control (not really informing the user what it's up to).

Applications should make sure they place all the language values they intend to support in the DllRegisterServer routine or in an INF file in the main CAB's OSD from the very beginning. This ensures an appropriate placeholder is put in the registry for future upgrading when the language version matching the browser becomes available. Internet Component Download (code download) looks up the language of the browser by checking the version information of Shdocvw32.dll and compares it to the semicolon-delimited IS01739 name language section. If a match is found, CDL downloads the CAB.

If the specific language CAB is empty or not found and English is not supported (only German, for example), the download will proceed by following the same path as an unmet dependency would in Internet Component Download (an empty box is displayed in the HTML).

Notes:

Wins:

Constructing CABs for Multiple Languages

To support multiple languages, two types of CAB files need to be present:

Main data CAB

The main data CAB consists of three text files:

The main OSD file contains the different language implementation information, as well as the locations of the individual language CABs.

You will need to edit these files as languages become available by adding IMPLEMENTATION sections.

The following is an example of the main OSD file.

<?XML version="1.0"?>
<!DOCTYPE SOFTPKG SYSTEM "http://www.microsoft.com/standards/osd/osd.dtd">
<?XML::namespace href="http://www.microsoft.com/standards/osd/msicd.dtd" as="msicd"?>

<SOFTPKG NAME="{039397C0-46DF-11D0-99CB-00C04FD64497}" VERSION="4,3,0,2077" >
    <Title>MS Chat</Title>
    <MSICD::NativeCode>
        <Code NAME="MsChatPr.ocx" CLASSID="clsid:039397C0-46DF-11D0-99CB-00C04FD64497"
		    VERSION="4,3,0,2077">
    <IMPLEMENTATION>
        <LANGUAGE VALUE="ja" />
        <Processor VALUE="x86" />
        <Codebase HREF="JaChatPr.cab" />
    </IMPLEMENTATION>
    <IMPLEMENTATION>
        <LANGUAGE VALUE="de" />
        <Processor VALUE="x86" />
        <Codebase HREF="DeChatPr.cab" />
    </IMPLEMENTATION>
    <IMPLEMENTATION>
        <Processor VALUE="x86" />
        <Codebase HREF="EnChatPr.cab" />
    </IMPLEMENTATION>
        </Code>
    <Code NAME="RegEntry">
        <IMPLEMENTATION>
           <Codebase FILENAME="langchk.inf" />
        </IMPLEMENTATION>
    </Code>
			
    </MSICD::NativeCode>
</SOFTPKG>

The following is a sample INF file to set the language check period.

; Copyright (c) 1996 Microsoft Corporation

[Version]
Signature="$Chicago$" 
AdvancedINF=2.5

[DefaultInstall]
AddReg=IEIntl.Add.Reg

[DefaultInstall.NT]
AddReg=IEIntl.Add.Reg

[IEIntl.Add.Reg]
HKCR,%MSCHATCHECK%,"DE",3,"5"
HKCR,%MSCHATCHECK%,"JA",3,"5"
HKCR,%MSCHATCHECK%,"FR",3,"15"
HKCR,%MSCHATCHECK%,"KO",3,"15"
HKCR,%MSCHATCHECK%,"TW",3,"15"
HKCR,%MSCHATCHECK%,"",,"Enabled"

[Strings]
MSCHATCHECK = "CLSID\{039397C0-46DF-11D0-99CB-00C04FD64497}\LanguageCheckPeriod"

Individual language CABs

The individual language CABs contain the following files:

The object OSD file would contain the information on how to install this language version, including any code dependencies and so on.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.